local.m4, precision.m4: Introduce `vpnnat' network class for nefarious hacks.
[firewall] / precision.m4
index 598a990..2a07763 100644 (file)
@@ -36,5 +36,17 @@ allowservices inbound udp \
 dnsresolver inbound
 dnsserver inbound
 
+## Nefarious VPN NAT hack.
+for i in PREROUTING OUTPUT POSTROUTING; do
+  run iptables -t nat -P $i ACCEPT 2>/dev/null || :
+  run iptables -t nat -F $i 2>/dev/null || :
+done
+run iptables -t nat -F
+run iptables -t nat -X
+makeset vpn-nat hash:net family inet
+run iptables -t nat -A POSTROUTING -o eth0 \
+       -m set --match-set vpn-nat dst \
+       -j SNAT --to-source 212.13.198.70
+
 m4_divert(-1)
 ###----- That's all, folks --------------------------------------------------