smatson
February 26th, 2005, 03:56
running on OpenBSD 3.6 -stable updated 2 days ago.
Please let me know of any suggestions to improve security (or any really stupid things i've done that hurt security!). Thanks for your help everyone.
also, is there any reason I couldn't make all the pass rules quick? Since there are no block rules below them I don't see why not, but nobody seems to do this, so I must be missing something...???
pf.conf:
ext="xl0"
int="xl1"
#desktop ip
dtop="192.168.2.214"
# remote desktop
rd="3389"
# emule
em="4661, 4662, 4665, 4672, 4711"
# azureus
az="14955, 6969"
tcp_services="ssh,smtp,domain,auth,www"
icmp_types="echoreq"
w95="Windows 95"
w98="Windows 98"
no_route_ips = "{ 127.0.0.0/8, 192.168.0.0/16, \
172.16.0.0/12, 10.0.0.0/8 }"
scrub in all
# nat and rdr
################################################## #############
nat on $ext inet from $int:network to any -> ($ext)
rdr on $ext proto tcp from any to any port {$em,$az,$rd} -> $dtop
rdr on $ext proto udp from any to any port {$em,$az} -> $dtop
# block rules
################################################## #############
block in all
block out all
block in quick on $ext from $no_route_ips to any
block out quick on $ext from any to $no_route_ips
block in quick from no-route to any
block in quick on $ext from any to 255.255.255.255
block in quick on $ext proto tcp from any \
os {$w95,$w98} to any port smtp
block in quick on $ext proto tcp from any \
os Linux to ($ext) port ssh
antispoof quick for $int inet
# pass rules
################################################## #############
pass quick on lo0 all
pass in on $int proto {tcp, udp} all modulate state
pass out on $ext proto {tcp, udp} all modulate state
pass in on $ext proto tcp from any to any \
port {$tcp_services} flags S/SA keep state
pass in on $ext proto tcp from any to $dtop \
port {$em,$rd,$az} flags S/SA keep state
pass in on $ext proto udp from any to $dtop \
port {$em,$az} keep state
# allow ping
pass inet proto icmp all icmp-type $icmp_types keep state
Please let me know of any suggestions to improve security (or any really stupid things i've done that hurt security!). Thanks for your help everyone.
also, is there any reason I couldn't make all the pass rules quick? Since there are no block rules below them I don't see why not, but nobody seems to do this, so I must be missing something...???
pf.conf:
ext="xl0"
int="xl1"
#desktop ip
dtop="192.168.2.214"
# remote desktop
rd="3389"
# emule
em="4661, 4662, 4665, 4672, 4711"
# azureus
az="14955, 6969"
tcp_services="ssh,smtp,domain,auth,www"
icmp_types="echoreq"
w95="Windows 95"
w98="Windows 98"
no_route_ips = "{ 127.0.0.0/8, 192.168.0.0/16, \
172.16.0.0/12, 10.0.0.0/8 }"
scrub in all
# nat and rdr
################################################## #############
nat on $ext inet from $int:network to any -> ($ext)
rdr on $ext proto tcp from any to any port {$em,$az,$rd} -> $dtop
rdr on $ext proto udp from any to any port {$em,$az} -> $dtop
# block rules
################################################## #############
block in all
block out all
block in quick on $ext from $no_route_ips to any
block out quick on $ext from any to $no_route_ips
block in quick from no-route to any
block in quick on $ext from any to 255.255.255.255
block in quick on $ext proto tcp from any \
os {$w95,$w98} to any port smtp
block in quick on $ext proto tcp from any \
os Linux to ($ext) port ssh
antispoof quick for $int inet
# pass rules
################################################## #############
pass quick on lo0 all
pass in on $int proto {tcp, udp} all modulate state
pass out on $ext proto {tcp, udp} all modulate state
pass in on $ext proto tcp from any to any \
port {$tcp_services} flags S/SA keep state
pass in on $ext proto tcp from any to $dtop \
port {$em,$rd,$az} flags S/SA keep state
pass in on $ext proto udp from any to $dtop \
port {$em,$az} keep state
# allow ping
pass inet proto icmp all icmp-type $icmp_types keep state