29a.ch by Jonas Wagner

Forwarding ports using netcat

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.