Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Blocking URL's in Pfsense firewall for specifi range of IP

    Scheduled Pinned Locked Moved Firewalling
    2 Posts 2 Posters 706 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wedz
      last edited by

      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

      1. Blocksites
        name: blockwebsite
        type: host
        IP/FQDN: www.facebook.com
      2. Unauthorusers
        name: unauthorize
        type: network
        Network or FQDN : 192.168.0.10/24

      Firewall Rules

      Action: block
      Interface: WAN
      Address Family: IPv4
      Protocol: TCP/UPD

      Source: Single host or alias : unauthorize
      ports : any any

      Destination: Single host or alias : blocksites
      Port: any any

      Pls check my configuration if anything i forgot or mistaken.

      Thanks and advance!

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.