iptables in place, but ports are not open!

August 10, 2013 9.7k views
Below is my iptables output. Depite this, the only port I can access is 58580. Ports 80, 2086, etc are not open. Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp dpt:http state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:http state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:http limit: avg 25/min burst 100 ACCEPT tcp -- anywhere anywhere tcp dpt:2082 state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:2083 state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:gnunet state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:2087 state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:58580 state NEW,ESTABLISHED Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp spt:smtp state ESTABLISHED ACCEPT udp -- anywhere anywhere udp dpt:domain
7 Answers
Is there a firewall on your end? Try asking a friend to access your droplet on port 80 for example, does it work for them?

Is there anything listening on port 80? What's the output of this command?

netstat -plutn | grep :80
I used an on-line port check utility to see if the port was open, and it said no. I also tried to access the sever thru ssh to specific ports, I also tried to access the server thru port 80 with a browser. All with no luck.

I get ":80 command not found' with the netstat command
If I run the command 'netstat -pln | grep 80 i get:

tcp 0 96 192.241.193.47:58580 c-24-8-98-11.hsd1:55073 ESTABLISHED
unix 2 [ ] DGRAM 8091
unix 3 [ ] STREAM CONNECTED 6680

58580 is the port I use for telnet
What OS are you on? Try disabling iptables and see if you can access port 80 without iptables in place.
If I flush the iptables, I still cannot reach the server. If I use a port check utility, 80 and all ports are closed except my telnet port.
There doesn't seem to be anything listening on port 80 -- do you have a webserver running?
nginx, and I restarted it to make sure it was up before checking.

I will have to retrace my steps for the nginx setup. Not sure what else to do.

thanks for your help
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!