1 1.7.2.2 martin # $NetBSD: npftest.conf,v 1.7.2.2 2020/06/20 15:46:48 martin Exp $ 2 1.1 rmind 3 1.1 rmind $ext_if = "npftest0" 4 1.1 rmind $int_if = "npftest1" 5 1.1 rmind 6 1.7.2.2 martin set portmap.min_port 1024 7 1.7.2.2 martin set portmap.max_port 65535 8 1.7.2.2 martin 9 1.1 rmind # 10 1.1 rmind # RFC 5737 11 1.1 rmind # 12 1.1 rmind 13 1.1 rmind $pub_ip1 = 192.0.2.1 14 1.1 rmind $pub_ip2 = 192.0.2.2 15 1.4 rmind $pub_ip3 = 192.0.2.3 16 1.1 rmind 17 1.1 rmind $local_ip1 = 10.1.1.1 18 1.1 rmind $local_ip2 = 10.1.1.2 19 1.1 rmind $local_ip3 = 10.1.1.3 20 1.1 rmind $local_ip4 = 10.1.1.4 21 1.1 rmind 22 1.1 rmind $local_net = { 10.1.1.0/24 } 23 1.1 rmind $ports = { 8000, 9000 } 24 1.1 rmind 25 1.4 rmind map $ext_if static $local_ip3 <-> $pub_ip3 26 1.1 rmind map $ext_if dynamic $local_ip2 <-> $pub_ip2 27 1.1 rmind map $ext_if dynamic $local_net -> $pub_ip1 28 1.1 rmind map $ext_if dynamic $local_ip1 port 6000 <- $pub_ip1 port 8000 29 1.1 rmind 30 1.6 rmind $net6_inner = fd01:203:405::/48 31 1.6 rmind $net6_outer = 2001:db8:1::/48 32 1.6 rmind 33 1.6 rmind $net_a = 10.100.0.0/16 34 1.6 rmind $net_b = 10.255.0.0/16 35 1.6 rmind 36 1.5 rmind map $ext_if static algo npt66 $net6_inner <-> $net6_outer 37 1.6 rmind map $ext_if static algo netmap $net_a <-> $net_b 38 1.7.2.1 martin map ruleset "map:some-daemon" on $ext_if 39 1.5 rmind 40 1.3 rmind group "ext" on $ext_if { 41 1.4 rmind pass out final from $local_ip3 42 1.4 rmind pass in final to $pub_ip3 43 1.4 rmind 44 1.5 rmind pass out final from $net6_inner 45 1.5 rmind pass in final to $net6_outer 46 1.5 rmind 47 1.6 rmind pass out final from $net_a 48 1.6 rmind pass in final to $net_b 49 1.6 rmind 50 1.1 rmind pass stateful out final proto tcp flags S/SA all 51 1.1 rmind pass stateful out final from $local_net 52 1.1 rmind pass stateful in final to any port $ports 53 1.1 rmind pass stateful in final proto icmp all 54 1.1 rmind block all 55 1.1 rmind } 56 1.1 rmind 57 1.3 rmind group "int" on $int_if { 58 1.3 rmind ruleset "test-rules" 59 1.1 rmind pass stateful out final to $local_ip2 60 1.1 rmind pass out final to $local_ip3 61 1.1 rmind block final to $local_ip4 62 1.1 rmind } 63 1.1 rmind 64 1.3 rmind group default { 65 1.1 rmind block all 66 1.1 rmind } 67