Problem
You want to forward all traffic from a port on your box, to another host/port combination.
Solution
The command in the example will port forward, from the local box – any traffic sent to port 8081, will be sent to port 8080 on www.example.com:
Example
ssh -x -g -L 8081:www.example.com:8080 localhost
Don't forget, if you need to open LINUX (FC4) firewall, do this (as root):
vi /etc/sysconfig/iptables # add following line then save, exit
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT
/etc/init.d/iptables restart
Reference
[tags]Port forwarding, SSH, Unix Coding School[/tags]