FreeBSD router (IPFW-based): how to block an URL (all IPs of an A-like HOSTNAME)

Bernt Hansson bernt at bah.homeip.net
Thu Jun 17 20:47:27 UTC 2010


Valerian Galeru said the following on 2010-06-17 22:01:
> Hello,
> 
> Does anyone have any ideas how to block all requests using an IPFW-based router
 > (FreeBSD 6.4) to and from a HOSTNAME (which has more DNS A entries) 
or better, from any *.HOSTNAME.COM ????

Do a whois hostname.com taking note of their ip-address range. Then, for 
ipf, put this in your rules file.

### EXAMPLE ###

block in quick on fxp0 from 192.168.0.0/16 to any
block out quick on fxp0 from any to 192.168.0.0/16


More information about the freebsd-questions mailing list