xref: /openbsd/regress/sbin/pfctl/pf17.in (revision fc61954a)
1# test binat
2
3match on lo0 from 192.168.1.1 to any binat-to 10.0.0.1
4match on lo0 proto tcp from 192.168.1.2 to any binat-to 10.0.0.2
5match on lo0 proto udp from 192.168.1.3 to any binat-to 10.0.0.3
6match on lo0 proto icmp from 192.168.1.4 to any binat-to 10.0.0.4
7
8match on lo0 from 192.168.1.5 to 172.16.1.1 binat-to 10.0.0.5
9match on lo0 from 192.168.1.6 to 172.16.1.2/32 binat-to 10.0.0.6
10match on lo0 from 192.168.1.7 to 172.16.2.0/24 binat-to 10.0.0.7
11
12match on lo0 from 192.168.2.0/24 to any binat-to 10.0.5.0/24
13match on lo0 from 192.168.2.0/28 to any binat-to 10.0.4.0/28
14match on lo0 from 192.168.2.0/30 to 192.168.3.1 binat-to 10.0.3.0/30
15
16match on lo0 from 192.168.1.8 to ! 172.17.0.0/16 binat-to 10.0.0.8
17
18match on lo0 from 1.1.1.1 to no-route binat-to 2.2.2.2
19match on lo0 from (lo0:0) to 1.1.1.1 binat-to 2.2.2.2
20match on lo0 from (lo0:0) to 1.1.1.1 binat-to (lo1000000:0)
21match on lo0 inet from (lo0:0) to (lo1000000:0) binat-to (lo1000000:0)
22match on lo0 from 1.1.1.1 to <sometable> binat-to 2.2.2.2
23match on lo0 from 1.1.1.1 to !<sometable> binat-to 2.2.2.2
24match on lo0 from 1.1.1.1 to (lo1000000:0) binat-to 2.2.2.2
25match on lo0 from 1.1.1.1 to !(lo1000000:0) binat-to 2.2.2.2
26match on lo0 from (lo0:0) to <sometable> binat-to 2.2.2.2
27
28match on lo0 from ::1 to no-route binat-to ::2
29match on lo0 from (lo0:0) to ::1 binat-to ::2
30match on lo0 from (lo0:0) to ::1 binat-to (lo1000000:0)
31match on lo0 inet6 from (lo0:0) to (lo1000000:0) binat-to (lo1000000:0)
32match on lo0 from ::1 to <sometable> binat-to ::2
33match on lo0 from ::1 to !<sometable> binat-to ::2
34match on lo0 from ::1 to (lo1000000:0) binat-to ::2
35match on lo0 from ::1 to !(lo1000000:0) binat-to ::2
36match on lo0 from (lo0:0) to <sometable> binat-to ::2
37
38match on lo0 from ::1 to (lo0) binat-to ::1
39match on lo0 from ::1 to (lo0:0) binat-to ::1
40match on lo0 from ::1 to (lo0:peer) binat-to ::1
41match on lo0 from ::1 to (lo0:peer:0) binat-to ::1
42match on lo0 from ::1 to (lo0:broadcast) binat-to ::1
43match on lo0 from ::1 to (lo0:broadcast:0) binat-to ::1
44match on lo0 from ::1 to (lo0:network) binat-to ::1
45match on lo0 from ::1 to (lo0:network:0) binat-to ::1
46match on lo0 from ::1 to (lo0)/100 binat-to ::2
47match on lo0 from ::1 to (lo0:0)/100 binat-to ::2
48match on lo0 from ::1 to (lo0:peer)/100 binat-to ::2
49match on lo0 from ::1 to (lo0:peer:0)/100 binat-to ::2
50
51match on lo from (lo0:0) to ::1 binat-to ::2
52match on tun from (lo0:0) to ::1 binat-to ::2
53