Search code examples
linuxportforwardinggatewaynetcat

netcat: Listen to incoming connections through WAN


Does netcat have the ability to listen on a port behind NAT?

Or maybe it can perform port-forwarding automatically through UPnP ?


Solution

  • netcat can listen on a port on the machine that it runs on... so if your machine is behind a NAT, it can listen on a port behind a NAT and if port-forwarding is done correctly on the NAT box, your netcat process will be accessible from outside the NAT; netcat cannot do port forwarding but you could use something like stunnel for that.