How do I determine which program is rerouting traffic on port 80?

robamaton asked:

A while back, I wanted to redirect all port 80 traffic on an Ubuntu server to port 3000 for a Rails app. Instead of just using iptables, I googled around and found some other way to do it (I can’t imagine why I didn’t find iptables first), but now I can’t remember how I did it! Is there some way to track what’s going on so I can turn it off? There are no rules in iptables and traffic never gets to apache.



No, you normally just need to load the new ruleset. See: . But don’t despair. Iptables can be confusing. – Stefan Lasiewski

My answer:

To find out what process is listening on port 80:

sudo netstat -tnlp | grep -w 80

It should hopefully be obvious from the output what it is.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.