Creating a Listening Port

Having a server that listens is good, but when testing with a firewall and you don’t necessarily have the listening port behind it yet, you can simply use the Netcat command.

This command will act as if it were a server-type service that starts listening:

  nc -l numero_du_port
  

or

  nc -lp numero_du_port
  

The command varies depending on the version of netcat.

If you want the connection to remain open:

  nc -lk numero_du_port
  

Then all you need to do is test it:

  nc @IP numero_du_port
  

Resources

Last updated 27 Apr 2012, 07:55 CEST. history