blob: 60bda4017c5999f11bc1956a40290850d4077ad9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/bash
EXPECTED="table ip x {
chain y {
type nat hook postrouting priority srcnat; policy accept;
snat ip prefix to ip saddr map { 10.141.11.0/24 : 192.168.2.0/24,
10.141.12.0/24 : 192.168.3.0/24,
10.141.13.0/24 : 192.168.4.0/24 }
}
}
table ip6 x {
chain y {
type nat hook postrouting priority srcnat; policy accept;
snat ip6 prefix to ip6 saddr map { 2001:db8:1111::/64 : 2001:db8:2222::/64 }
}
}
"
set -e
$NFT -f - <<< $EXPECTED
|