I have client / server and there is a firewall between them.
The server is listening on a port and I want to check if this port is allowed by the firewall.
I can only know the ports that the machine is listening on using netcat, but I want to know if the server port is allowed to pass.

closed as unclear what you're asking by TildalWave, Xander, Steve, gowenfawr, Gilles Sep 7 '14 at 6:03

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • possible duplicate of Use nmap correctly – gowenfawr Sep 6 '14 at 22:51
  • This question is basically "how do I port scan" - see this question for some simple basics, and maybe google 'nmap tutorial' – gowenfawr Sep 6 '14 at 22:52
  • If it's available, use Telnet. – k1DBLITZ Sep 9 '14 at 17:15
  • If I understand your question correctly. You are sitting on a client and trying to access a server which is behind a firewall. You want to know whether the connection from the client to the server will go past the firewall on a specific port. If that is what you want then you can use nmap like this - nmap -Pn -sT -p T:80 www.google.com. This will send a Syn packet to the destination only on that specific port. If you want to test a UDP port use U:53 instead of T:80 – user1720897 Sep 11 '14 at 6:52

The easiest solution without having to fire up your server application would be to use netcat.

user@ ~$ nc -vl 1234
Connection from port 1234 [tcp/*] accepted

user@ ~$ nc 1234

Please forgive me if this does not answer your question as this does create a listening socket. I just wanted to share this as an option.

Not the answer you're looking for? Browse other questions tagged or ask your own question.