Navigation

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

    Distinction between traffic on port 443

    General pfSense Questions
    5
    17
    4197
    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
      Panja last edited by

      At the moment I have my pfSense boxed configured with 2 OpenVPN daemons.
      One on port 1194 UDP and the other one on port 443 TCP.

      But I have a webserver behind my firewall which serves a few sites with HTTPS as well.
      At the moment they are configure to run on port 4443 instead of 443 because OpenVPN uses that port.

      Is there a way on the pfSense box to know what traffic is coming in and forward accordingly?
      So when I connect with my OpenVPN client on port 443 it goes to my OpenVPN daemon but if it's web traffic it forwards the request to my webserver (on port 443).

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

        https://doc.pfsense.org/index.php/Sharing_a_Port_with_OpenVPN_and_a_Web_Server

        There you go - that is how its done.

        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
        2440 2.4.5p1 | 2x 3100 2.4.4p3 | 2x 3100 22.01 | 4860 22.01

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

          Many thanks John.
          Life saver. :D

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

            I have it configured and it is working but web traffic is terribly slow.

            I read the following line:
            NOTE: This requires using TCP, and may result in reduced VPN performance.

            But it does not state anything about web traffic being slow.
            Is that something that can be fixed or should I just deal with it?

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

              You wouldn't need this is your not using tcp on 443 for openvpn..

              Did you think it was going to be FAST??  Do you have vpn clients at the same time you have web traffic?

              Are you using openvpn on 443 tcp because you need to make sure its open where your clients are?  This is common reason to run it on that port.

              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
              2440 2.4.5p1 | 2x 3100 2.4.4p3 | 2x 3100 22.01 | 4860 22.01

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

                Has nothing to do with web traffic in particular, doing that just isn't going to be as fast as using a dedicated port, which still wouldn't be quite as fast as using UDP instead.

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

                  When I use OpenVPN I always use the UDP daemon, for speed.
                  But for compatibility I have a second daemon running on port 443, as this port almost never gets blocked.

                  When I was testing the port-share option I did not have any vpn clients connected.

                  1 Reply Last reply Reply Quote 0
                  • N
                    NOYB last edited by

                    Could you run the web server exclusively on 443 and put the OpenVPN TCP service on port 80?

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

                      What exactly is slow??  That is not a technical term ;)  To a race car driver you doing 90 in a 75mph zone is slow ;)  If your on gig, 100mbps is SLOW.. If am using 10ge than your gig is like watching paint dry…

                      What benchmark did you do without the port sharing, and then with the port sharing and what was the performance hit??

                      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
                      2440 2.4.5p1 | 2x 3100 2.4.4p3 | 2x 3100 22.01 | 4860 22.01

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

                        I could try port 80 for OpenVPN. That could be an option. But I have to use port share also.
                        Because the webserver does serve some regular HTTP sites as well.

                        What is exactly slow?
                        I get what you mean and maybe I had to explain myself a bit more.
                        So I will do now.

                        I have 2 SSL sites behind the pfSense box. When I put them on their own port (4443) without port sharing the pages load instantly, you'll get the login prompt (put in your credentials) and the page after that loads instantly as well.

                        When I put the sites on port 443 with port sharing it takes around 10 seconds more to load the first page with the login.
                        After putting in your credentials it takes another 8 - 10 seconds before the second page loads.

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

                          Welcome to port sharing ;)  System has to figure out that is not openvpn traffic, but web traffic - send that on, etc. etc..

                          I would suggest you get another public IP if you want to serve up different services off the same port ;)

                          What you could do is redirect traffic that comes in on 443 for your webserver to new port that way it will be faster.. And you just take a hit on people coming in on https://your.domain.tld, they hit that page - then get redirected to https://your.domain.tld:4433

                          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
                          2440 2.4.5p1 | 2x 3100 2.4.4p3 | 2x 3100 22.01 | 4860 22.01

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

                            Ok, thanks for the heads up. I'll have a look.

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

                              I'm witnessing the exact same thing.

                              Have port-share enabled, that forwards regular https traffic forward to my synology.
                              I was already using port-share on a Asus Router (which was speced way lower than my current pfSense box  ;D). On the Asus router I had no speed issues with port-share.
                              With pfSense (and port-share) is really slow. If I access the web server through another port speed is fine.

                              @Panja: What did you end up with? Are you living with decreased https-performance?

                              Any other solutions or explanations?

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

                                So your asus router was running openvpn and using the openvpn port sharing feature to send on to something behind?  Or did it have some other port sharing feature??

                                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
                                2440 2.4.5p1 | 2x 3100 2.4.4p3 | 2x 3100 22.01 | 4860 22.01

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

                                  Yes, the Asus router was running OpenVPN with port-share (activated in a text field for additional OpenVPN config, like in pfSense). No other proprietary feature or whatsoever.

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

                                    anyone?

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

                                      @tazzler:

                                      @Panja: What did you end up with? Are you living with decreased https-performance?

                                      I ended up changing the ports.
                                      I could not live with the decreased speed.

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post