Can’t connect to port 80, connections are all stuck SYN_RECV

tcp

I'm unable to connect to my server on port 22 or 80. When I run netstat, I see that there are a few connections, all of them stuck in SYN_RECV. Googling revealed mostly questions about DDOS. Since there are very few connections this seems unlikely (although I am on a shared host (slicehost)).

What else could be causing this?

Best Answer

Check that your /etc/hosts.deny isn't corrupted. That happened to me once and caused extremely bizarre problems with hung netowkr services.

Check your firewall rules (sudo /sbin/iptables -nvL). You could have your firewall configured to allow incoming connections but block outgoing connections, causing incoming connections to hang.

Can you connect to those ports on the machine itself? For example, if you are logged on to the system, does running telnet localhost 80 do anything?

Anything interesting in logfiles like /var/log/secure or /var/log/messages?