Blocking URL's in Pfsense firewall for specifi range of IP
-
Hi, pls anyone help me, i'm trying to block websites URL for specific IP using Alias and firewall rules, but nothing works.
i create 2 alias
- Blocksites
name: blockwebsite
type: host
IP/FQDN: www.facebook.com - Unauthorusers
name: unauthorize
type: network
Network or FQDN : 192.168.0.10/24
Firewall Rules
Action: block
Interface: WAN
Address Family: IPv4
Protocol: TCP/UPDSource: Single host or alias : unauthorize
ports : any anyDestination: Single host or alias : blocksites
Port: any anyPls check my configuration if anything i forgot or mistaken.
Thanks and advance!
- Blocksites
-
You can't use a host alias like that for a site like facebook. That will be resolved to a single IP when the ruleset is created but facebook is actually a vast number of IPs.
You can try to use an AS number either manually:
https://docs.netgate.com/pfsense/en/latest/firewall/blocking-websites.html#blocking-facebook
Or using pfBlocker to auto update it.Or you could block that using the DNS instead which can be more effective.
Steve