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

    How to block HTTPS website?

    Scheduled Pinned Locked Moved General pfSense Questions
    21 Posts 10 Posters 76.0k 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.
    • M
      Metu69salemi
      last edited by

      Glad if any of three same kind suggestions may help

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

        an alias to apps.facebook.com can do the job also.

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

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • J
          joako
          last edited by

          @stephenw10:

          Squid can't proxy https traffic. You have to block all https to force people to use the proxy.

          You could block all https and then allow it only to sites you need.

          As Metu69salemi suggested, create an alias containing all of facebook's IPs and block that.

          Steve

          Squid can indeed proxy HTTPS traffic. I think what you refer to is due to the design of the HTTPS protocol it is not possible (with any software) to setup a transparent HTTPS proxy.

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

            Hmm, I stand corrected.
            I would think, though, that in this case it wouldn't be useful since as you say it can't be transparent.
            This raises some interesting questions about the end-to-end encryption of https.  :-
            More reading required….

            Steve

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

              Squid can indeed proxy HTTPS traffic. I think what you refer to is due to the design of the HTTPS protocol it is not possible (with any software) to setup a transparent HTTPS proxy.

              It could be done, but requires some 'nasty' configuration.

              You have to create a local CA, install CA certificate on users machines and forward all https to your local web server with proxy mode, just like man-in-the-middle attack.

              Imspector has this options to proxy msn_https communication and create self-signed certificates to match common-name client check.

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

              Help a community developer! ;D

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

                Hi All,

                Thank you so much for suggestions.

                thx.

                1 Reply Last reply Reply Quote 0
                • E
                  emel_punk
                  last edited by

                  Well….

                  i have recently discover on linux how to block sites per contain so any string that contains facebook, will be block

                  iptables -A FORWARD -p tcp -m string --string "facebook" --algo kmp -j DROP

                  i works for me... i do not know if with ipfw will  have some simillar parameter ... i hope seo because im about to migrate to pfsense

                  @sudo:

                  Hi All,

                  Anybody know how to block HTTPS base sites. (ex. https://facebook.com) without blocking only 443 port. because It block all the https base site. I want to block only mail sites.

                  Thanks in Advance

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

                    pfSense uses pf(4) not ipfw. Though it does use ipfw for the captive portal function.
                    I think you may out of luck translating that from iptables.  :-\

                    Steve

                    1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator
                      last edited by

                      "This raises some interesting questions about the end-to-end encryption of https."

                      Depends on how your doing it – by default its just a Tunnel that squid passes the packets through - it has no understanding of what is inside the tunnel.  Which is why it can be difficult to filter on https urls, etc.

                      here is a good read on how squid can handle https and or any other protocol you want to allow through the proxy
                      http://wiki.squid-cache.org/Features/HTTPS

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      1 Reply Last reply Reply Quote 0
                      • R
                        rjcrowder
                        last edited by

                        @stephenw10:

                        pfSense uses pf(4) not ipfw. Though it does use ipfw for the captive portal function.
                        I think you may out of luck translating that from iptables.  :-\

                        Steve

                        If you don't mind setting up the rules manually, you can activate the portal and then create your own ipfw rules. The only trick is to make the last step in your rules skip over the portal rules (assuming you don't want captive portal functionality).

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