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

    Common name containing underscore

    Scheduled Pinned Locked Moved OpenVPN
    13 Posts 4 Posters 1.5k 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.
    • jimpJ
      jimp Rebel Alliance Developer Netgate
      last edited by

      I can't seem to reproduce this either. I made a couple certs with underscores and connected to OpenVPN and the client shows up fine in the widget and on the OpenVPN status page.

      Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      • GilG
        Gil Rebel Alliance
        last edited by

        I can see the correct CN appear in the OpenVPN System Logs.
        The CN appearing in the OpenVPN Widget is truncated at the underscore,
        however I have another certificate that matches this CN.

        In other words I have a CN that is "USER" and another that is "USER_Mobile".
        The "USER_Mobile" CN appears in the system log but the "USER" CN appears in the widget.

        I am also using client specific overrides, which I am now experimenting with turning them on and off.

        11 cheers for binary

        1 Reply Last reply Reply Quote 0
        • GilG
          Gil Rebel Alliance
          last edited by

          Okay, this is not a pfSense fault.
          It is appears to be an error with the Android OpenVPN App I was using.
          (OpenVPN Client by colucci-web - the Paid Version)
          I have imported the same OVPN profile into "OpenVPN for Android" and the CN appears correctly.
          Still seems bizarre, given the pfSense logs contain the correct CN from the "OpenVPN Client" App
          I will do some more testing.

          11 cheers for binary

          1 Reply Last reply Reply Quote 0
          • GilG
            Gil Rebel Alliance
            last edited by

            The issue is PARTLY my user error.
            I had inadvertently put the username & password for the "USER" OpenVPN client profile into the "USER_Mobile" OpenVPN client profile.
            And; I had disabled the Enforce the Strict User CN matching whilst fault finding.

            BUT:
            The CN appearing in the OpenVPN Widget appears to be the USER ID;
            & NOT the actual CN.

            This probably is only pertinent to a" Remote Access SSL/TLS + User Auth" OpenVPN Server.

            11 cheers for binary

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              That's expected. We pass a config parameter to OpenVPN that tells it to use the username as the common name.

              Either way it will be something other than expected, but taking the username is more likely to be accurate and what the user wants.

              Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • GilG
                Gil Rebel Alliance
                last edited by

                That works fine, confusing when the labelling is inaccurate though.
                Shouldn't the CSO refer to user name rather than CN?

                11 cheers for binary

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  Not necessarily. We go with what OpenVPN says there.

                  In a purely SSL/TLS VPN, it's the common name (there is no usename). In purely user auth, it's the username. With both, it's still the username.

                  It would be far too wordy to label it "Common Name/Username" everywhere.

                  Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • GilG
                    Gil Rebel Alliance
                    last edited by

                    Point taken on the real estate issue.
                    Seems to me that "User Name" is more accurate than "Common Name", as you pointed out: OpenVPN only reverts to the Common Name when no User Name is present.
                    Trying not to nitpick but this becomes critical when routing via CSO's.

                    (I also notice that there is a tip about this in the GI section of the CSO)

                    11 cheers for binary

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

                      Can't you just generate certificates with the exact Username as CommonName and not use username-as-common-name?
                      Never a problem with CSO that way.

                      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
                      • GilG
                        Gil Rebel Alliance
                        last edited by

                        Yes Pippin, I think that is best practice - and I do that.

                        You should also ensure that you Enforce CN / User Matching when using CSO's
                        Otherwise; a user with a valid cert can circumvent the intended CSO routing / firewalling if he knows another user's name & pwd.
                        (Or a mindless Sys Admin can get himself confused )

                        11 cheers for binary

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