All pastes #442412 Raw Edit

Teltariat

public text v1 · immutable
·published 2007-04-16 08:17 UTC
rendered paste body
Blocking specific sites with pf:

Easiest way to do this is with tables.

# pf.conf

table <blocked-hosts> persist file "/etc/blocked-hosts" 

block in quick on $external_interface from { <blocked-hosts> } to any
block out quick on $external_interface from { <blocked-hosts> } to any

# A quicker more efficient rule should just be:
block quick on $external_interface from any to { <blocked-hosts> }

# Now just make a file in /etc named blocked-hosts, and fill it with the addresses you want to block, one address per line.