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

    OpenVPN client connecting from unusual port number

    Scheduled Pinned Locked Moved OpenVPN
    14 Posts 5 Posters 1.3k 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.
    • adamwA
      adamw
      last edited by adamw

      That's what I thought re high port numbers.
      BUT...
      Why ALL the other clients I can see (i.e. several) report PUBLIC_IP:1194 in real address just not mine?
      I know they connect from Linux and various versions of Windows and use different client versions.

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

        Normally, the client software chooses a random outgoing port.
        But isn't not forbidding to override this behaviour, and choose a port.

        And now the urban legends phenomenon kicks in : people see the word "VPN", so they think they have to choose "1194" (even) when they use a VPN client.
        Which is based on upon ... nothing.

        It would still work, because, when ports are the same, the incoming IP's are not.
        If both the IP and port are the same for two incoming connection then you have that typical situation that starts with
        "Bug in pfSense ......"

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

        JKnottJ 1 Reply Last reply Reply Quote 0
        • RicoR
          Rico LAYER 8 Rebel Alliance
          last edited by

          For my OpenVPN Clients (I have a LOT) I very often see high ports on CGN connections but default OpenVPN port 1194 for clients using a real public IP. Guess why. ๐Ÿ˜‰

          -Rico

          adamwA 1 Reply Last reply Reply Quote 2
          • adamwA
            adamw @Rico
            last edited by

            @Rico
            I'm guessing I should consider myself lucky then? :)
            Is there an easy way to determine if ISP utilises CGN or not?

            JKnottJ 1 Reply Last reply Reply Quote 0
            • JKnottJ
              JKnott @Gertjan
              last edited by

              @Gertjan said in OpenVPN client connecting from unusual port number:

              But isn't not forbidding to override this behaviour, and choose a port.

              For example, DHCP, the server is 67 and client is always 68. There are some other protocols with similar but, generally, the source port is random.

              PfSense running on Qotom mini PC
              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
              UniFi AC-Lite access point

              I haven't lost my mind. It's around here...somewhere...

              1 Reply Last reply Reply Quote 0
              • JKnottJ
                JKnott @adamw
                last edited by

                @adamw said in OpenVPN client connecting from unusual port number:

                Is there an easy way to determine if ISP utilises CGN or not?

                Yes, check the IP address you get. There's a block just for CGN, 100.64.0.0/10.

                PfSense running on Qotom mini PC
                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                UniFi AC-Lite access point

                I haven't lost my mind. It's around here...somewhere...

                1 Reply Last reply Reply Quote 0
                • adamwA
                  adamw
                  last edited by

                  Hmm, neither of my clients' public IPs is on 100.64.0.0/10 range.

                  JKnottJ 1 Reply Last reply Reply Quote 0
                  • JKnottJ
                    JKnott @adamw
                    last edited by

                    @adamw

                    Perhaps RFC 1918 then?

                    Can you ping their WAN address from elsewhere? If you can, then they have a public address.

                    PfSense running on Qotom mini PC
                    i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                    UniFi AC-Lite access point

                    I haven't lost my mind. It's around here...somewhere...

                    1 Reply Last reply Reply Quote 0
                    • PippinP
                      Pippin
                      last edited by

                      Or a test site?
                      https://ip.bieringer.de/cgn-test.html

                      Or trace?
                      traceroute -n -U 8.8.8.8
                      traceroute -n -UL 8.8.8.8
                      traceroute -n -T 8.8.8.8
                      traceroute -n -I 8.8.8.8

                      I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
                      Halton Arp

                      1 Reply Last reply Reply Quote 0
                      • RicoR
                        Rico LAYER 8 Rebel Alliance
                        last edited by

                        The easy way is check your Routers WAN IP and compare with a site like whatismyipaddress.com
                        If the IP is different you are using CGN.
                        With the Router WAN IP RFC1918 you don't need to check any further of course, then it is 1000% CGN. ๐Ÿ˜‚

                        -Rico

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