diff --git a/samples/basic-legacy/cards.conf b/samples/basic-legacy/cards.conf new file mode 100644 index 0000000..e250818 --- /dev/null +++ b/samples/basic-legacy/cards.conf @@ -0,0 +1,4 @@ +external_card="em0" +internal_card="bge0" + + diff --git a/samples/basic-legacy/pf.conf b/samples/basic-legacy/pf.conf new file mode 100644 index 0000000..91e6ccc --- /dev/null +++ b/samples/basic-legacy/pf.conf @@ -0,0 +1,41 @@ +include "cards.conf" + +set block-policy drop +set loginterface external + +set skip on lo0 +set skip on lo + +# Unroutable networks: +table { 127.0.0.0/8 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 192.88.99.0/24 198.18.0.0/15 } + +table { 127.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8, 192.88.99.0/24 198.18.0.0/15 2001:db8::/32 3fff::/20 } + +nat on $external_card inet from !($external_card) -> ($external_card:0) +nat-anchor "ftp-proxy/*" +rdr-anchor "ftp-proxy/*" + +block drop in quick on external from + +block drop in quick from # User defined junk table +block drop out quick to # User defined junk table + +# Scrub stuff via a matchrule: +match in all scrub ( random-id reassemble tcp fragment reassemble ) + + +# Start with a paranoid default: +block all + +# ICMP is important, don't block it +pass proto { icmp ipv4-icmp } keep state + +# DHCPv4 from ISP +pass in quick on external inet proto udp to (external) port { 67, 68 } + +pass out all + +antispoof for internal +antispoof for external + +pass in on internal all diff --git a/samples/basic-legacy/rc.conf b/samples/basic-legacy/rc.conf new file mode 100644 index 0000000..0a6fa94 --- /dev/null +++ b/samples/basic-legacy/rc.conf @@ -0,0 +1,7 @@ +. ${rc_router_dir}/sample/basic_legacy/cards.conf + +add_v4_net ${internal_card} 0 main + +add_v4_isp ${external_card} dhcp + +pf_config=${rc_router_dir}/sample/basic-legacy/pf.conf