Hello,
I followed a little tutorial to open a port.
I edited
/etc/sysconfig/iptables
I added
-A INPUT -p tcp -m state --state NEW -m tcp --dport 5280 -j ACCEPT
I restarted the firewall
service iptables restart
But the port remains closed :
> nmap -v -sV localhost -p 5280
Starting Nmap 5.51 ( http://nmap.org ) at 2012-11-19 11:27 BRT
NSE: Loaded 8 scripts for scanning.
Initiating SYN Stealth Scan at 11:27
Scanning localhost (127.0.0.1) [1 port]
Completed SYN Stealth Scan at 11:27, 0.01s elapsed (1 total ports)
Initiating Service scan at 11:27
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000056s latency).
Other addresses for localhost (not scanned): 127.0.0.1
rDNS record for 127.0.0.1: bio1
PORT STATE SERVICE VERSION
5280/tcp closed xmpp-bosh
Read data files from: /usr/share/nmap
Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 0.14 seconds
Raw packets sent: 1 (44B) | Rcvd: 2 (84B)
What is the problem with my configuration ?
[SOLVED] problem to open a port
Re: problem to open a port
You need to make sure you added the rule before the final REJECT one in the default ruleset. If this doesn't apply to you then post the output of the iptables-save command.
Re: problem to open a port
Hello TrevorH,
yes, I added this line before REJECT.
Finally, I solved the problem. I changed the command to :
-A INPUT -p tcp --dport 5280 -j ACCEPT
Now, the port is open.
thanks for your help
yes, I added this line before REJECT.
Finally, I solved the problem. I changed the command to :
-A INPUT -p tcp --dport 5280 -j ACCEPT
Now, the port is open.
thanks for your help
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
[SOLVED] problem to open a port
Thank you for reporting back with your positive result.
On your behalf and for posterity, this thread is now marked [SOLVED].
On your behalf and for posterity, this thread is now marked [SOLVED].