summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/dumps/0047nat_0.nft
blob: 97c04a1637a2e06759fc4bd180f32ace121a8f6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
table ip x {
	map y {
		type ipv4_addr : interval ipv4_addr
		flags interval
		elements = { 10.141.10.0/24 : 192.168.2.2-192.168.2.4, 10.141.11.0/24 : 192.168.4.2/31,
			     10.141.12.0/24 : 192.168.5.10-192.168.5.20 }
	}

	chain y {
		type nat hook postrouting priority srcnat; policy accept;
		snat ip to ip saddr map @y
	}
}
table inet x {
	chain x {
		type nat hook prerouting priority dstnat; policy accept;
		dnat ip to ip daddr . tcp dport map { 10.141.10.1 . 22 : 192.168.2.2, 10.141.11.2 . 2222 : 192.168.4.2 }
	}

	chain y {
		type nat hook postrouting priority srcnat; policy accept;
		snat ip to ip saddr map { 10.141.10.0/24 : 192.168.2.2-192.168.2.4, 10.141.11.0/24 : 192.168.4.2/31 }
	}
}