Show pageOld revisionsBacklinksAdd to bookExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. {{tag>[linux iptables]}} ====== IPTables ====== ===== Forward port to another host ===== SNAT and DNAT <code> IPLOCAL=a.b.c.d IPREMOTE=x.y.z.w echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A PREROUTING -p tcp --dport 33307 -j DNAT --to-destination ${IPREMOTE}:3306 iptables -t nat -A POSTROUTING -p tcp -d ${IPREMOTE} --dport 3306 -j SNAT --to-source ${IPLOCAL} </code> projects/zibaldone/linux/iptables.txt Last modified: 2021/10/08 14:51by scipio