Port forwarding allows remote computers (for example, computers on the Internet) to
connect to a specific computer or service within a private local-area network (LAN).
Source:Wiki
Here is my version of local port forwarding. I created a script for finding me a local unused port and then forward all traffic on that local port to some remote server on a predefined port.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
The above script will forward all the traffic on 10.115.13.108:32003 to 10.145.2.233:8000.
Please note that you will need a user to be existing on 10.145.2.233. The script will ask you for the password.
Hope this helps someone.
To read more about different types of port forwarding etc, See also:
http://www.debianadmin.com/howto-use-ssh-local-and-remote-port-forwarding.html
http://www.networkactiv.com/AUTAPF.html
https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding
http://www.revsys.com/writings/quicktips/ssh-tunnel.html