Home | History | Annotate | Line # | Download | only in npftest
npftest.conf revision 1.2
      1  1.2  rmind # $NetBSD: npftest.conf,v 1.2 2013/02/09 03:35:33 rmind 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.1  rmind #
      7  1.1  rmind # RFC 5737
      8  1.1  rmind #
      9  1.1  rmind 
     10  1.1  rmind $pub_ip1 = 192.0.2.1
     11  1.1  rmind $pub_ip2 = 192.0.2.2
     12  1.1  rmind 
     13  1.1  rmind $local_ip1 = 10.1.1.1
     14  1.1  rmind $local_ip2 = 10.1.1.2
     15  1.1  rmind $local_ip3 = 10.1.1.3
     16  1.1  rmind $local_ip4 = 10.1.1.4
     17  1.1  rmind 
     18  1.1  rmind $local_net = { 10.1.1.0/24 }
     19  1.1  rmind $ports = { 8000, 9000 }
     20  1.1  rmind 
     21  1.1  rmind map $ext_if dynamic $local_ip2 <-> $pub_ip2
     22  1.1  rmind map $ext_if dynamic $local_net -> $pub_ip1
     23  1.1  rmind map $ext_if dynamic $local_ip1 port 6000 <- $pub_ip1 port 8000
     24  1.1  rmind 
     25  1.1  rmind group (interface $ext_if) {
     26  1.1  rmind 	pass stateful out final proto tcp flags S/SA all
     27  1.1  rmind 	pass stateful out final from $local_net
     28  1.1  rmind 	pass stateful in final to any port $ports
     29  1.1  rmind 	pass stateful in final proto icmp all
     30  1.1  rmind 	block all
     31  1.1  rmind }
     32  1.1  rmind 
     33  1.1  rmind group (interface $int_if) {
     34  1.2  rmind 	ruleset (name "test-rules", dynamic)
     35  1.1  rmind 	pass stateful out final to $local_ip2
     36  1.1  rmind 	pass out final to $local_ip3
     37  1.1  rmind 	block final to $local_ip4
     38  1.1  rmind }
     39  1.1  rmind 
     40  1.1  rmind group (default) {
     41  1.1  rmind 	block all
     42  1.1  rmind }
     43