summaryrefslogtreecommitdiffstats
path: root/tests/py/ip/snat.t
blob: 38acf52ffe094e1540ef1185da8580ae9f6ccd3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
:postrouting;type nat hook postrouting priority 0

*ip;test-ip4;postrouting

iifname "eth0" tcp dport 80-90 snat to 192.168.3.2;ok
iifname "eth0" tcp dport != 80-90 snat to 192.168.3.2;ok
iifname "eth0" tcp dport {80, 90, 23} snat to 192.168.3.2;ok
iifname "eth0" tcp dport != {80, 90, 23} snat to 192.168.3.2;ok

iifname "eth0" tcp dport != 23-34 snat to 192.168.3.2;ok

snat ip to ip saddr map { 10.141.11.4 : 192.168.2.3 . 80 };ok
snat ip to ip saddr map { 10.141.11.4 : 192.168.2.2-192.168.2.4 };ok
snat ip to ip saddr map { 10.141.12.14 : 192.168.2.0/24 };ok
snat ip prefix to ip saddr map { 10.141.11.0/24 : 192.168.2.0/24 };ok