Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got an external Debian server. The problem is that my university campus doesn't allow connections to go outside when the port is different than TCP port 22, 80, 443, or UDP port 123. I tested them manually. On my Debian server I would like to listen to all my UDP and TCP ports so I can clearly figure out which TCP and UDP ports my university let through their firewall. Nmap is wonderful on the client side to test that, but what should I do on the server side?

share|improve this question
up vote 2 down vote accepted

No need to listen to all ports.

Just use tcpdump:

tcpdump host <the-ip-address-your-scan-will-come-from>

Every packet that makes it through the firewall to the debian server will be shown.

share|improve this answer
Thank you for a lot for this. It solve the TCP port scanning. What about UDP? – Michael Nov 16 '11 at 2:40
tcpdump is a bit of a misnomer, it can capture any type of packet – Paul Nov 16 '11 at 2:52
Yes, I saw that after using it. Thank you. – Michael Nov 16 '11 at 2:56
tcpdump -nnq src host <campus-ip> and not port ssh – Michael Nov 16 '11 at 4:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .