run iptables -t nat -X
run iptables -t nat -A POSTROUTING -j SNAT --to-source 10.165.27.3 \
- -o eth0 -s 172.29.198.0/23
+ -s 172.29.198.0/23 -d 10.165.27.0/24 -o eth0
+
+clearchain nat:portfwd
+run iptables -t nat -A portfwd -j DNAT \
+ -p tcp --dport 3128 --to-destination 172.29.199.228
+for c in OUTPUT PREROUTING; do
+ run iptables -t nat -A $c -j portfwd \
+ -s 10.165.27.0/24 -d 10.165.27.3
+done
m4_divert(-1)
###----- That's all, folks --------------------------------------------------