• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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.2k 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 Offline
    Metu69salemi
    last edited by Dec 10, 2011, 11:52 PM

    Glad if any of three same kind suggestions may help

    1 Reply Last reply Reply Quote 0
    • M Offline
      marcelloc
      last edited by Dec 11, 2011, 2:45 AM

      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 Offline
        joako
        last edited by Dec 11, 2011, 4:52 AM

        @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
        • S Offline
          stephenw10 Netgate Administrator
          last edited by Dec 11, 2011, 4:13 PM

          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
          • M Offline
            marcelloc
            last edited by Dec 11, 2011, 10:25 PM

            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 Offline
              sudo
              last edited by Dec 12, 2011, 8:08 AM

              Hi All,

              Thank you so much for suggestions.

              thx.

              1 Reply Last reply Reply Quote 0
              • E Offline
                emel_punk
                last edited by Sep 24, 2012, 6:45 PM

                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
                • S Offline
                  stephenw10 Netgate Administrator
                  last edited by Sep 24, 2012, 7:32 PM

                  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
                  • J Offline
                    johnpoz LAYER 8 Global Moderator
                    last edited by Sep 24, 2012, 7:40 PM

                    "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 25.07.1 | Lab VMs 2.8.1, 25.07.1

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      rjcrowder
                      last edited by Sep 24, 2012, 8:02 PM

                      @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.
                        [[user:consent.lead]]
                        [[user:consent.not_received]]