Debian Codegraph @

testing/pluto/ikev2-ikeport-04-rw-nat-initiator/nicinit.sh

raw
1 iptables -t nat -F
2 iptables -F
3 # NAT
4 iptables -t nat -A POSTROUTING -s 192.1.3.0/24 -p udp --sport 4500 -j SNAT --to-source 192.1.2.254:3500-3700
5 iptables -t nat -A POSTROUTING -s 192.1.3.0/24 -p udp --sport 500 -j SNAT --to-source 192.1.2.254:2500-2700
6 iptables -t nat -A POSTROUTING --source 192.1.3.0/24 --destination 0.0.0.0/0 -j SNAT --to-source 192.1.2.254
7 # make sure that we never acidentially let ESP through.
8 #
9 iptables -I FORWARD 1 --proto 50 -j DROP
10 iptables -I FORWARD 2 --destination 192.0.2.0/24 -j DROP
11 iptables -I FORWARD 3 --source 192.0.2.0/24 -j DROP
12 # route
13 iptables -I INPUT 1 --destination 192.0.2.0/24 -j DROP
14 # Display the table, so we know it is correct.
15 iptables -t nat -L -n
16 iptables -L -n
17 echo "initdone"
18 : ==== end ====