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

    Block vpn connection on port 443

    pfSense Packages
    5
    14
    1.8k
    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.
    • D
      dintzee
      last edited by

      hello,

      i have pfsense 2.4.5 with proxy(transparant+ssl Interception) and i blocked all the port except (http,https,mail,dns interne) and also web filtering to block (social media, ect...)

      my probleme is some users use vpn public with port 443 to bypass my filtering

      please can i have help.

      thanks

      DaddyGoD 1 Reply Last reply Reply Quote 0
      • DaddyGoD
        DaddyGo @dintzee
        last edited by

        @dintzee said in Block vpn connection on port 443:

        probleme is some users use vpn public with port 443

        this is a difficult question, because of 443
        I would do this with pfBlockerNG:

        https://github.com/ejrv/VPNs

        Cats bury it so they can't see it!
        (You know what I mean if you have a cat)

        D 1 Reply Last reply Reply Quote 0
        • D
          dintzee @DaddyGo
          last edited by

          @DaddyGo

          ok thanks i will try with pfblockerNG

          DaddyGoD 1 Reply Last reply Reply Quote 0
          • DaddyGoD
            DaddyGo @dintzee
            last edited by

            @dintzee

            you welcome 😉

            Cats bury it so they can't see it!
            (You know what I mean if you have a cat)

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

              More insight here : https://security.stackexchange.com/questions/229324/how-to-block-vpns-using-tcp-port-443

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

              DaddyGoD 1 Reply Last reply Reply Quote 0
              • DaddyGoD
                DaddyGo @Gertjan
                last edited by

                @Gertjan

                yes it is...

                my opinion is that, pfBlockerNG is more elegant...
                the question of the timeliness of lists arises, but there may be plenty of IPs (VPN , datacenter, etc.) change in the world... that is a fact.
                (they invented "sysadmin" name, concepts to follow and/or solve this case)

                I don't know what kind of workstations these are, but with group policy (win), a lot of things are available...

                BTW: unless the VPN is installed in browsers by add-on(s)

                Cats bury it so they can't see it!
                (You know what I mean if you have a cat)

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

                  i can still connect to vpn with some apps tested i think i need something like detect connection vpn and close it

                  N 1 Reply Last reply Reply Quote 0
                  • N
                    netblues @dintzee
                    last edited by

                    pfblockerng is fine, as long as there is a way to find vpn addresses from a list which gets updated.
                    Its impossible to have a list that can contain all vpn ip's .
                    A savvy user could even rent a vps somewhere and use that as a 443 vpn host. No list will ever find him.

                    So we are left with options that can detect protocol anomalies and report them. This means an ids/ips service.
                    suricata and snort are the available options.

                    At least in theory.

                    About a year ago I was trying to pass openvpn client traffic to a pfsense openvpn server.
                    The site was protected with a fortigate firewall.
                    No matter what port I used, fortigate would detect it was openvpn and block it as an anomaly.
                    Only after creating a specific allow rule on fortigate openvpn would work.
                    Didn't have time to investigate any further.
                    I would love to see how this can be done with suricata/snort :)

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

                      yes true i need to try with snort with openappsid i think but on interface lan or wan ? !

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

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • kiokomanK
                          kiokoman LAYER 8
                          last edited by

                          LAN, where the connection to the vpn is initiated

                          ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                          Please do not use chat/PM to ask for help
                          we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
                          Don't forget to Upvote with the 👍 button for any post you find to be helpful.

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

                            still i can't block most vpn using port 443

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

                              And even if you can, you'll find out taht you can't block every VPN technology, whatever resources you throw at it. And with resources I mean : knowledge.

                              Keep in mind that the concept VPN should not be interchanged with "oh, it's OpenVPN" that is just a way of doing VPN. VPN can be set up using any a variety of solutions among encoding, encrypting, compressing etc.
                              Not everybody uses OpenVPN.

                              So, even if you manage to fake the VPN client, making it 'think' it is connecting to a it's addressed VPN server because 'you, on pfSense' can decode the SSL that was created using the public key of the VPN server (the server uses it's unknown private key to decode, a key you do not have) you have to take the next barrier : how do decompress, decrypt, the tunnelled data. The format of that data could be .... anything.

                              It's probably easier to filter for classic https web browser traffic, and let that pass, blocking the rest.
                              Still, you have to do the MITM job, by becoming, for example, a squid expert. Many tried this, and most didn't come back - did't report back, from that journey.

                              It all boils down to : if you want to share your Internet access, you can do so, but you really can't control what people actually do with that connection.

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

                              DaddyGoD 1 Reply Last reply Reply Quote 0
                              • DaddyGoD
                                DaddyGo @Gertjan
                                last edited by

                                @Gertjan said in Block vpn connection on port 443:

                                Not everybody uses OpenVPN.

                                I agree....

                                ExpressVPN also uses several connection methods depending on the point from which it starts..

                                router usually OpenVPN
                                ExpVPN app usually IKEv2 + EAP

                                etc....

                                Cats bury it so they can't see it!
                                (You know what I mean if you have a cat)

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