| 1 |
iptables -t nat -F |
| 2 |
nic # |
| 3 |
iptables -F |
| 4 |
nic # |
| 5 |
iptables -t nat -L |
| 6 |
Chain PREROUTING (policy ACCEPT) |
| 7 |
target prot opt source destination |
| 8 |
Chain INPUT (policy ACCEPT) |
| 9 |
target prot opt source destination |
| 10 |
Chain OUTPUT (policy ACCEPT) |
| 11 |
target prot opt source destination |
| 12 |
Chain POSTROUTING (policy ACCEPT) |
| 13 |
target prot opt source destination |
| 14 |
nic # |
| 15 |
# NAT |
| 16 |
nic # |
| 17 |
iptables -t nat -A POSTROUTING -s 192.1.3.0/24 -p udp --sport 4500 -j SNAT --to-source 192.1.2.254:32768-33000 |
| 18 |
nic # |
| 19 |
iptables -t nat -A POSTROUTING -s 192.1.3.0/24 -p udp --sport 500 -j SNAT --to-source 192.1.2.254:33001-33100 |
| 20 |
nic # |
| 21 |
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 |
| 22 |
nic # |
| 23 |
iptables -I FORWARD 1 --proto 50 -j DROP |
| 24 |
nic # |
| 25 |
echo done |
| 26 |
done |
| 27 |
|