View Single Post
  #5   (View Single Post)  
Old 1st September 2017
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

Put this in a script:

echo "table <facebook> {" > /some/path/facebook.com
whois -h whois.radb.net '!gas32934' | grep '/' | tr ' ' ',' >> /some/path/facebook.com
echo "}" >> /some/path/facebook.com

Ensure pf loads /some/path/facebook.com and contains something like:

block return in from any to <facebook>

Periodically re-run the script for any IP range updates.

It's a sledgehammer approach. It isn't perfect, but it has worked for me.
__________________
Linux/Network-Security Engineer by Profession. OpenBSD user by choice.
Reply With Quote