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

    How to block a website ?

    Scheduled Pinned Locked Moved General pfSense Questions
    7 Posts 4 Posters 452 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.
    • C
      cheleby
      last edited by

      Hı all. İ need to block some website. Netflix, Instagram,disneyplus etc. I tried many thing but didnt work. Probably My bad. How can I do that basicly ?

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

        The easiest way is to block the DNS resolution for it using a related AS number.
        Like: https://docs.netgate.com/pfsense/en/latest/recipes/block-websites.html#using-dns

        M 1 Reply Last reply Reply Quote 1
        • M
          michmoor LAYER 8 Rebel Alliance @stephenw10
          last edited by

          @stephenw10 Instagram is tricky as they use CDNs. Really any of the above providers can be challenging.

          Blocking using regex is covered in this latest post.

          https://forum.netgate.com/topic/196318/i-cannot-block-instagram-thru-pfblockerng/3?_=1738971351081

          Firewall: NetGate,Palo Alto-VM,Juniper SRX
          Routing: Juniper, Arista, Cisco
          Switching: Juniper, Arista, Cisco
          Wireless: Unifi, Aruba IAP
          JNCIP,CCNP Enterprise

          C 1 Reply Last reply Reply Quote 0
          • C
            cheleby @michmoor
            last edited by

            @michmoor it worked but I have 10 computer. Do I have to go all client and apply ipconfig /flushdns ?

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

              No. Most DNS has a pretty low TTL meaning that anything stored locally will be timed out without needing to manually flush it.

              1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan @cheleby
                last edited by

                @cheleby said in How to block a website ?:

                it worked but I have 10 computer. Do I have to go all client and apply ipconfig /flushdns ?

                First solution : just wait. Every host name resolved will eventually time out, so need to be resolved again.
                Second solution : locate the main power switch. Do what you have to do anyway at least ones a month : test the earth leak detector. If all is well, it will trip., the power goes off. This will power down de PCs also. When they reboot, the local DNS will be empty ;)
                Third solution : Disable (power down) your local switch and access points. Device will have to re create the connection. This will also flush the stored DNS cache.
                Fourth solution : no solution : go visit your PCs. Are they that far ? ^^

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                C 1 Reply Last reply Reply Quote 0
                • C
                  cheleby @Gertjan
                  last edited by

                  thank you all

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