29a.ch experiments by Jonas Wagner

Forwarding ports using netcat

Written by

You can fordward ports from userspace using netcat like this:

nc -l -p $localport -c "nc $remotehost $remoteport"

Example:

nc -l -p 8888 -c "nc example.com 8888"

Caution: This starts a new process for every connection to the port.

comments powered by Disqus