Opening ports with IPTables not working - Ubuntu

Posted by user41416 on Server Fault See other posts from Server Fault or by user41416
Published on 2012-09-02T17:56:54Z Indexed on 2012/11/13 17:03 UTC
Read the original article Hit count: 187

Filed under:
|
|

So, I have these rules set in iptables:

# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere             tcp dpts:6850:6999
ACCEPT     udp  --  anywhere             anywhere             udp dpts:6850:6999
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:6881

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Although, the ports are not open :/ here is a telnet attempt:

# telnet localhost 6999
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

Any idea why this is happening? Do I need to reboot or do someone to make the changes permanent? Last time I rebooted the rules disappeared from iptables :/

© Server Fault or respective owner

Related posts about ubuntu

Related posts about iptables