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

    How to block https://facebook.com

    Scheduled Pinned Locked Moved Firewalling
    23 Posts 13 Posters 38.9k 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.
    • P
      plankton
      last edited by

      Hello

      I was wondering if anyone have figured out a way to block https://facebook.com?

      I have managed to block http://facebook.com, using Proxy server - access control…
      but it's just not worth blocking if they can just type in a "s" after "http"...

      Thanks in advance!
      -Andrew

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        If you are using transparent proxy, you can only filter http port. Move to automatic proxy detect/configuration(WPAD/PAC) to get it working.

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • P
          plankton
          last edited by

          @marcelloc:

          If you are using transparent proxy, you can only filter http port. Move to automatic proxy detect/configuration(WPAD/PAC) to get it working.

          Is there any easier way? If this is done, the students computers will use much more time to log-on,
          and don't really want to start with upstream proxy etc.

          1 Reply Last reply Reply Quote 0
          • marcellocM
            marcelloc
            last edited by

            @plankton:

            Is there any easier way?

            No. Transparent proxy can't intercept https communications.

            @plankton:

            If this is done, the students computers will use much more time to log-on,
            and don't really want to start with upstream proxy etc.

            pac does not slow down logon time.

            Folow this tutorial skiping Active directory configuration, do only dns + dhcp

            http://blog.ninjatek.co.za/2010/11/proxy-autodetection-using-pac-file-and.html

            Treinamentos de Elite: http://sys-squad.com

            Help a community developer! ;D

            1 Reply Last reply Reply Quote 0
            • Cry HavokC
              Cry Havok
              last edited by

              Moving from transparent proxy to an auto-detect won't slow things down.

              1 Reply Last reply Reply Quote 0
              • S
                spillek
                last edited by

                @marcelloc:

                If you are using transparent proxy, you can only filter http port. Move to automatic proxy detect/configuration(WPAD/PAC) to get it working.

                where is the options ?
                tks!

                1 Reply Last reply Reply Quote 0
                • Cry HavokC
                  Cry Havok
                  last edited by

                  You need to configure it both in the proxy (remove the transparent option) and in the browser's own proxy settings (and optionally in DNS). You'll also need to have a web server host the WPAD file - Wikipedia has more.

                  1 Reply Last reply Reply Quote 0
                  • D
                    dhatz
                    last edited by

                    @plankton:

                    @marcelloc:

                    If you are using transparent proxy, you can only filter http port. Move to automatic proxy detect/configuration(WPAD/PAC) to get it working.

                    Is there any easier way? If this is done, the students computers will use much more time to log-on,
                    and don't really want to start with upstream proxy etc.

                    The easiest way (which would also work with the base pfsense install, i.e. no 3rd party packages like squid) would be to define an alias with Facebook's IP ranges in CIDR format (easily found online, or you can create the list yourself using whois etc), and create a block rule for that.

                    Another easy way would be to "blackhole" facebook.com using pfsense's DNS forwarder to create a DNS override to some "other" IP (this only works as long as people can't manually configure their devices to use a 3rd party DNS - so you may have to block 3rd party DNS servers)

                    Finally you can do "generic" URL filtering e.g. with squid/squidguard but to catch https would require you to configure them via WPAD/PAC to use your proxy, as explained by others.

                    1 Reply Last reply Reply Quote 0
                    • S
                      spillek
                      last edited by

                      @dhatz:

                      The easiest way (which would also work with the base pfsense install, i.e. no 3rd party packages like squid) would be to define an alias with Facebook's IP ranges in CIDR format (easily found online, or you can create the list yourself using whois etc), and create a block rule for that.

                      I already try with below IP, but floating o lan rule don't work !

                      1 Reply Last reply Reply Quote 0
                      • S
                        spillek
                        last edited by

                        no idea?

                        1 Reply Last reply Reply Quote 0
                        • marcellocM
                          marcelloc
                          last edited by

                          A single rule on lan denying access to your alias should work.

                          Also include apps.facebook.com name on your alias.

                          To use wpad/pac, follow this tutorial skiping active directory configuration

                          http://blog.ninjatek.co.za/2010/11/proxy-autodetection-using-pac-file-and.html

                          Treinamentos de Elite: http://sys-squad.com

                          Help a community developer! ;D

                          1 Reply Last reply Reply Quote 0
                          • A
                            alpharomeo33
                            last edited by

                            I'm using the recent version 2.0.1

                            how do i block facebook in that version?

                            1 Reply Last reply Reply Quote 0
                            • marcellocM
                              marcelloc
                              last edited by

                              Create a firewall alias with facebook hostnames and/or ip ranges and then apply it on a firewall -> rule on lan interface.

                              Treinamentos de Elite: http://sys-squad.com

                              Help a community developer! ;D

                              1 Reply Last reply Reply Quote 0
                              • T
                                tattoomees
                                last edited by

                                here is screenshot of by Fbook aliases works fine
                                and rule on LAN

                                fbook.png
                                fbook.png_thumb
                                fbook1.png
                                fbook1.png_thumb

                                1 Reply Last reply Reply Quote 0
                                • T
                                  TyperX
                                  last edited by

                                  Hai all, blocking https://www.facebook.com is working for me, but how to block only http://apps.facebook.com & https://apps.facebook.com without blocking normal facebook.com ? :)

                                  1 Reply Last reply Reply Quote 0
                                  • marcellocM
                                    marcelloc
                                    last edited by

                                    You can try with a proxy server instead of firewall rules but I'm not sure if you can block apps.facebook without blocking facebook at all.

                                    Treinamentos de Elite: http://sys-squad.com

                                    Help a community developer! ;D

                                    1 Reply Last reply Reply Quote 0
                                    • G
                                      gajanan
                                      last edited by

                                      @marcelloc:

                                      Create a firewall alias with facebook hostnames and/or ip ranges and then apply it on a firewall -> rule on lan interface.

                                      Hi,
                                      I tried the same in transperent proxy but it is not working for https.

                                      thanks in advance

                                      1 Reply Last reply Reply Quote 0
                                      • G
                                        gajanan
                                        last edited by

                                        @tattoomees:

                                        here is screenshot of by Fbook aliases works fine
                                        and rule on LAN

                                        Hi, I tried the same but it is nor working in transperent proxy.
                                        any help..

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          Metu69salemi
                                          last edited by

                                          transparent + https isn't going to work. firewall rules with alias and https will do the work

                                          1 Reply Last reply Reply Quote 0
                                          • C
                                            craigduff
                                            last edited by

                                            IF you want my advice.. I use Squid with Squid Guard to block Facebook and other social media websites. But i understand it can get complicated. A really easy solution is to use opendns.com which is truely amazing with the amount of protection you can get for your network.

                                            Kind Regards,
                                            Craig

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