blob: 50519c6b6bb6f4cf89f84d56543e9376558d7c57 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# iifname "eth0" tcp dport 81 snat ip to 192.168.3.2
inet test-inet postrouting
[ meta load iifname => reg 1 ]
[ cmp eq reg 1 0x30687465 0x00000000 0x00000000 0x00000000 ]
[ meta load l4proto => reg 1 ]
[ cmp eq reg 1 0x00000006 ]
[ payload load 2b @ transport header + 2 => reg 1 ]
[ cmp eq reg 1 0x00005100 ]
[ immediate reg 1 0x0203a8c0 ]
[ nat snat ip addr_min reg 1 ]
# iifname "eth0" tcp dport 81 ip saddr 10.1.1.1 snat to 192.168.3.2
inet test-inet postrouting
[ meta load iifname => reg 1 ]
[ cmp eq reg 1 0x30687465 0x00000000 0x00000000 0x00000000 ]
[ meta load l4proto => reg 1 ]
[ cmp eq reg 1 0x00000006 ]
[ payload load 2b @ transport header + 2 => reg 1 ]
[ cmp eq reg 1 0x00005100 ]
[ meta load nfproto => reg 1 ]
[ cmp eq reg 1 0x00000002 ]
[ payload load 4b @ network header + 12 => reg 1 ]
[ cmp eq reg 1 0x0101010a ]
[ immediate reg 1 0x0203a8c0 ]
[ nat snat ip addr_min reg 1 ]
# iifname "eth0" tcp dport 81 snat ip6 to dead::beef
inet test-inet postrouting
[ meta load iifname => reg 1 ]
[ cmp eq reg 1 0x30687465 0x00000000 0x00000000 0x00000000 ]
[ meta load l4proto => reg 1 ]
[ cmp eq reg 1 0x00000006 ]
[ payload load 2b @ transport header + 2 => reg 1 ]
[ cmp eq reg 1 0x00005100 ]
[ immediate reg 1 0x0000adde 0x00000000 0x00000000 0xefbe0000 ]
[ nat snat ip6 addr_min reg 1 ]
# iifname "foo" masquerade random
inet test-inet postrouting
[ meta load iifname => reg 1 ]
[ cmp eq reg 1 0x006f6f66 0x00000000 0x00000000 0x00000000 ]
[ masq flags 0x4 ]
|