so schaut meine pf.conf aus:
um die regeln zu testen habe ich das file mit pfctl geladen. dann bekomme ich folgende meldungen:
bsp zeile 19 (scrub in all) nur weis ich nicht was daran falsch sein sollte
Code:
##
#
# pf.conf v.0.1
#
##
ext_if="fxp0"
ppp_if="tun0"
int_if="em0"
wlan_if="sis0"
priv_nets1="{ 127.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8 }"
priv_nets2="{ 127.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8 }"
lan_nets="{ 192.168.0.0/24 }"
wlan_nets="{ 10.0.2.0/24 }"
#default rules
block in all
block out all
pass quick on lo0 all
scrub in all
block quick inet6
#logging on
set block-policy return
set loginterface $ext_if
set loginterface $ppp_if
#ip spoofing
block drop in quick on $ext_if from $priv_nets1 to any
block drop out quick on $ext_if from any to $priv_nets1
block drop in quick on $ppp_if from $priv_nets2 to any
block drop out quick on $ppp_if from any to $priv_nets2
antispoof for $ext_if inet
antispoof for $ppp_if inet
antispoof for $int_if inet
antispoof for $wlan_if inet
#nmap sucks
block in log quick on $ppp_if inet proto tcp from any to any flags FUP/FUP
block in log quick on $ppp_if inet proto tcp from any to any flags SF/SFRA
block in log quick on $ppp_if inet proto tcp from any to any flags /SFRA
#rules on ppp_if
pass out on $ppp_if proto tcp all modulate state flags S/SA
pass out on $ppp_if proto { udp, icmp } all keep state
pass in inet proto icmp all icmp-type echoreq keep state
#rules on int_if
pass in on $int_if from $lan_nets to any
pass out on $int_if from any to $lan_nets
#rules on wlan_if
pass out on $wlan_if proto esp from 10.0.2.1/32 to 10.0.2.0/24
pass in on $wlan_if proto esp from 10.0.2.0/24 to 10.10.10.10/32
pass out on $wlan_if proto udp from 10.0.2.1/32 to 10.0.2.0/24 port = 500
pass in on wi0 proto udp from 10.0.2.0/24 to 10.0.2.1/32 port = 500
#trans. proxy
rdr on $int_if inet proto tcp from any to any port www -> 127.0.0.1 port 3128
rdr on $int_if inet proto tcp from any to any port www -> 127.0.0.1 port 3128
#nat
nat on $int_if from $int_if:network to any -> ($ppp_if)
nat on $wlan_if from $wlan_if:network to any -> ($ppp_if)
um die regeln zu testen habe ich das file mit pfctl geladen. dann bekomme ich folgende meldungen:
Code:
/tmp/pf.conf:19: Rules must be in order: options, normalization, queueing, translation, filtering
/tmp/pf.conf:23: Rules must be in order: options, normalization, queueing, translation, filtering
/tmp/pf.conf:24: Rules must be in order: options, normalization, queueing, translation, filtering
/tmp/pf.conf:25: Rules must be in order: options, normalization, queueing, translation, filtering
/tmp/pf.conf:58: Rules must be in order: options, normalization, queueing, translation, filtering
/tmp/pf.conf:59: Rules must be in order: options, normalization, queueing, translation, filtering
/tmp/pf.conf:62: Rules must be in order: options, normalization, queueing, translation, filtering
/tmp/pf.conf:63: Rules must be in order: options, normalization, queueing, translation, filtering
bsp zeile 19 (scrub in all) nur weis ich nicht was daran falsch sein sollte