Its called port forwarding or NAT and the implemention depends on what type of router you have. If your router is a linux router you can use iptables:
#!/bin/sh
iptables -t nat -F
iptables -t filter -F
iptables -t nat -I PREROUTING -i eth0 -d 1.2.3.4 -p tcp --dport 10 -j DNAT --to-destination 192.168.1.2:10
iptables -t nat -A PREROUTING -d 1.2.3.4 -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -j SNAT --to-source 1.2.3.4
If you have a netgear, linksys, etc firewall then you should be able to set up forward rules through the GUI on the router @
http://192.168.1.1
Reputation Points: 1749
Solved Threads: 735
Senior Poster
Offline 3,948 posts
since Feb 2009