libipt_SNAT.txlate 818 Bytes
Newer Older
1
iptables-translate -t nat -A postrouting -o eth0 -j SNAT --to 1.2.3.4
2
nft add rule ip nat postrouting oifname "eth0" counter snat to 1.2.3.4
3
4

iptables-translate -t nat -A postrouting -o eth0 -j SNAT --to 1.2.3.4-1.2.3.6
5
nft add rule ip nat postrouting oifname "eth0" counter snat to 1.2.3.4-1.2.3.6
6
7

iptables-translate -t nat -A postrouting -p tcp -o eth0 -j SNAT --to 1.2.3.4:1-1023
8
nft add rule ip nat postrouting oifname "eth0" ip protocol tcp counter snat to 1.2.3.4:1-1023
9
10

iptables-translate -t nat -A postrouting -o eth0 -j SNAT --to 1.2.3.4 --random
11
nft add rule ip nat postrouting oifname "eth0" counter snat to 1.2.3.4 random
12
13

iptables-translate -t nat -A postrouting -o eth0 -j SNAT --to 1.2.3.4 --random --persistent
14
nft add rule ip nat postrouting oifname "eth0" counter snat to 1.2.3.4 random,persistent