# proxy, kind of iptables -t nat -A PREROUTING -p ALL -d 64.161.255.20 -i eth0 -j DNAT --to-destination 192.168.1.19 # in local if, change destination to: an irc server iptables -t nat -A PREROUTING -p ALL -d 192.168.1.19 -i eth0 -j DNAT --to-destination 64.161.255.20 # in local if, change destinaton back to: other host iptables -t nat -A POSTROUTING -p ALL -s 64.161.255.20 -o eth0 -j SNAT --to-source 192.168.48.128 # change source to local host because of forwarding iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -j ACCEPT