{\rtf1\ansi\ansicpg1252\cocoartf2709 \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} \paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 \f0\fs24 \cf0 set limit table-entries 400000\ set optimization normal\ set limit states 807000\ set limit src-nodes 807000\ \ #System aliases\ \ loopback = "\{ lo0 \}"\ WAN = "\{ igb0 \}"\ LAN = "\{ igb1 \}"\ \ #SSH Lockout Table\ table persist\ #Snort tables\ table \ table \ table persist file "/etc/bogons"\ table persist file "/etc/bogonsv6"\ table \ \ # User Aliases\ table \{ 208.123.73.209/32 2610:160:11:18::209/128 \}\ files01_netgate_com = ""\ table \{ 208.123.73.207/32 2610:160:11:18::207/128 \}\ files00_netgate_com = ""\ table \{ 208.123.73.209/32 2610:160:11:18::209/128 \}\ pkg01_atx_netgate_com = ""\ table \{ 208.123.73.207/32 2610:160:11:18::207/128 \}\ pkg00_atx_netgate_com = ""\ \ # Gateways\ GWWAN_DHCP = " route-to ( igb0 10.153.15.229 ) "\ \ \ set loginterface igb1\ \ set skip on pfsync0\ set keepcounters\ \ scrub on $WAN inet all fragment reassemble\ scrub on $WAN inet6 all fragment reassemble\ scrub on $LAN inet all fragment reassemble\ scrub on $LAN inet6 all fragment reassemble\ \ \ no nat proto carp\ no rdr proto carp\ nat-anchor "natearly/*"\ nat-anchor "natrules/*"\ \ \ # Outbound NAT rules (automatic)\ \ # Subnets to NAT\ tonatsubnets = "\{ 127.0.0.0/8 ::1/128 10.1.1.0/24 \}"\ nat on $WAN inet from $tonatsubnets to any port 500 -> 10.153.15.228/32 static-port\ nat on $WAN inet6 from $tonatsubnets to any port 500 -> (igb0) static-port\ nat on $WAN inet from $tonatsubnets to any -> 10.153.15.228/32 port 1024:65535\ nat on $WAN inet6 from $tonatsubnets to any -> (igb0) port 1024:65535\ # TFTP proxy\ rdr-anchor "tftp-proxy/*"\ # UPnPd rdr anchor\ rdr-anchor "miniupnpd"\ \ anchor "openvpn/*"\ anchor "ipsec/*"\ # block IPv4 link-local. Per RFC 3927, link local "MUST NOT" be forwarded by a routing device,\ # and clients "MUST NOT" send such packets to a router. FreeBSD won't route 169.254./16, but\ # route-to can override that, causing problems such as in redmine #2073\ block in log quick from 169.254.0.0/16 to any ridentifier 1000000101 label "Block IPv4 link-local"\ block in log quick from any to 169.254.0.0/16 ridentifier 1000000102 label "Block IPv4 link-local"\ #---------------------------------------------------------------------------\ # default deny rules\ #---------------------------------------------------------------------------\ block in log inet all ridentifier 1000000103 label "Default deny rule IPv4"\ block out log inet all ridentifier 1000000104 label "Default deny rule IPv4"\ block in log inet6 all ridentifier 1000000105 label "Default deny rule IPv6"\ block out log inet6 all ridentifier 1000000106 label "Default deny rule IPv6"\ \ # IPv6 ICMP is not auxiliary, it is required for operation\ # See man icmp6(4)\ # 1 unreach Destination unreachable\ # 2 toobig Packet too big\ # 128 echoreq Echo service request\ # 129 echorep Echo service reply\ # 133 routersol Router solicitation\ # 134 routeradv Router advertisement\ # 135 neighbrsol Neighbor solicitation\ # 136 neighbradv Neighbor advertisement\ pass quick inet6 proto ipv6-icmp from any to any icmp6-type \{1,2,135,136\} ridentifier 1000000107 keep state\ \ # Allow only bare essential icmpv6 packets (NS, NA, and RA, echoreq, echorep)\ pass out quick inet6 proto ipv6-icmp from fe80::/10 to fe80::/10 icmp6-type \{129,133,134,135,136\} ridentifier 1000000108 keep state\ pass out quick inet6 proto ipv6-icmp from fe80::/10 to ff02::/16 icmp6-type \{129,133,134,135,136\} ridentifier 1000000109 keep state\ pass in quick inet6 proto ipv6-icmp from fe80::/10 to fe80::/10 icmp6-type \{128,133,134,135,136\} ridentifier 1000000110 keep state\ pass in quick inet6 proto ipv6-icmp from ff02::/16 to fe80::/10 icmp6-type \{128,133,134,135,136\} ridentifier 1000000111 keep state\ pass in quick inet6 proto ipv6-icmp from fe80::/10 to ff02::/16 icmp6-type \{128,133,134,135,136\} ridentifier 1000000112 keep state\ pass in quick inet6 proto ipv6-icmp from :: to ff02::/16 icmp6-type \{128,133,134,135,136\} ridentifier 1000000113 keep state\ # We use the mighty pf, we cannot be fooled.\ block log quick inet proto \{ tcp, udp \} from any port = 0 to any ridentifier 1000000114 label "Block traffic from port 0"\ block log quick inet proto \{ tcp, udp \} from any to any port = 0 ridentifier 1000000115 label "Block traffic to port 0"\ block log quick inet6 proto \{ tcp, udp \} from any port = 0 to any ridentifier 1000000116 label "Block traffic from port 0"\ block log quick inet6 proto \{ tcp, udp \} from any to any port = 0 ridentifier 1000000117 label "Block traffic to port 0"\ \ # Snort package\ block log quick from to any ridentifier 1000000118 label "Block snort2c hosts"\ block log quick from any to ridentifier 1000000119 label "Block snort2c hosts"\ \ # SSH lockout\ block in log quick proto tcp from to (self) port 22 ridentifier 1000000301 label "sshguard"\ \ # webConfigurator lockout\ block in log quick proto tcp from to (self) port 443 ridentifier 1000000351 label "GUI Lockout"\ block in log quick from to any ridentifier 1000000400 label "virusprot overload table"\ # allow our DHCP client out to the WAN\ pass in quick on $WAN proto udp from any port = 67 to any port = 68 ridentifier 1000000561 label "allow dhcp client out WAN"\ pass out quick on $WAN proto udp from any port = 68 to any port = 67 ridentifier 1000000562 label "allow dhcp client out WAN"\ # Not installing DHCP server firewall rules for WAN which is configured for DHCP.\ # block bogon networks (IPv4)\ # http://www.cymru.com/Documents/bogon-bn-nonagg.txt\ block in log quick on $WAN from to any ridentifier 11001 label "block bogon IPv4 networks from WAN"\ # block bogon networks (IPv6)\ # http://www.team-cymru.org/Services/Bogons/fullbogons-ipv6.txt\ block in log quick on $WAN from to any ridentifier 11002 label "block bogon IPv6 networks from WAN"\ antispoof log for $WAN ridentifier 1000001570\ antispoof log for $LAN ridentifier 1000002620\ # allow access to DHCP server on LAN\ pass in quick on $LAN proto udp from any port = 68 to 255.255.255.255 port = 67 ridentifier 1000002641 label "allow access to DHCP server"\ pass in quick on $LAN proto udp from any port = 68 to 10.1.1.1 port = 67 ridentifier 1000002642 label "allow access to DHCP server"\ pass out quick on $LAN proto udp from 10.1.1.1 port = 67 to any port = 68 ridentifier 1000002643 label "allow access to DHCP server"\ # allow access to DHCPv6 server on LAN\ # We need inet6 icmp for stateless autoconfig and dhcpv6\ pass quick on $LAN inet6 proto udp from fe80::/10 to fe80::/10 port = 546 ridentifier 1000002651 label "allow access to DHCPv6 server"\ pass quick on $LAN inet6 proto udp from fe80::/10 to ff02::/16 port = 546 ridentifier 1000002652 label "allow access to DHCPv6 server"\ pass quick on $LAN inet6 proto udp from fe80::/10 to ff02::/16 port = 547 ridentifier 1000002653 label "allow access to DHCPv6 server"\ pass quick on $LAN inet6 proto udp from ff02::/16 to fe80::/10 port = 547 ridentifier 1000002654 label "allow access to DHCPv6 server"\ \ # loopback\ pass in on $loopback inet all ridentifier 1000002661 label "pass IPv4 loopback"\ pass out on $loopback inet all ridentifier 1000002662 label "pass IPv4 loopback"\ pass in on $loopback inet6 all ridentifier 1000002663 label "pass IPv6 loopback"\ pass out on $loopback inet6 all ridentifier 1000002664 label "pass IPv6 loopback"\ # let out anything from the firewall host itself and decrypted IPsec traffic\ pass out inet all keep state allow-opts ridentifier 1000002665 label "let out anything IPv4 from firewall host itself"\ pass out inet6 all keep state allow-opts ridentifier 1000002666 label "let out anything IPv6 from firewall host itself"\ \ pass out route-to ( igb0 10.153.15.229 ) from 10.153.15.228 to !10.153.15.228/31 ridentifier 1000002761 keep state allow-opts label "let out anything from firewall host itself"\ # make sure the user cannot lock himself out of the webConfigurator or SSH\ pass in quick on igb1 proto tcp from any to (igb1) port \{ 443 80 22 \} ridentifier 10001 keep state label "anti-lockout rule"\ \ # User-defined rules follow\ \ anchor "userrules/*"\ pass in quick on $WAN reply-to ( igb0 10.153.15.229 ) inet from any to any ridentifier 1687353285 keep state label "USER_RULE"\ pass in quick on $LAN inet from 10.1.1.0/24 to any ridentifier 0100000101 keep state label "USER_RULE: Default allow LAN to any rule"\ # source address is empty. label "USER_RULE: Default allow LAN IPv6 to any rule"\ \ # VPN Rules\ \ anchor "tftp-proxy/*"}