Opening ports with IPTables not working - Ubuntu
- by user41416
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 :/