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

    Unique CN, Common Username

    Scheduled Pinned Locked Moved OpenVPN
    4 Posts 2 Posters 737 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.
    • P
      PhYrE
      last edited by

      I'm clearly confused about something here and hopeful there's an easy solution.

      pfSense is linked with Active Directory, and hence returns authentication for user 'janedoe' and her password.

      OpenVPN is set up with a certificate for each user and device. So I'm making a certificate for janedoe-ipad, janedoe-laptop. Hence each certificate is 100% unique per device and should never collide. That said janedoe is one login/password.

      Meanwhile, I was surprised when I saw disconnects every few minutes with the typical line as follows:

      MULTI: new connection by client 'janedoe' will cause previous active sessions by this client to be dropped. Remember to use the --duplicate-cn option if you want multiple clients using the same certificate or username to concurrently connect.
      

      Now I understand I'm not supposed to use duplicate-cn and agree that I don't want duplicates coming in, which is why I made unique certificates in the first place to avoid this. Nevertheless, how do I deal with the same username but different certificate? Can I combine the common name to be both the device and the username? Can I make it keep certificates unique but allow multiple logins from the same user? Can I define what it uses for the common name (ie: the certificate common name versus the login common name)? Can I avoid it keeping logins unique (and is there any reason why I shouldn't)?

      What am I missing here? I can't be the first person to have multiple devices per user, no?

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

        OpenVPN, the way it's used here, assumes the username as the common name and not the common name of the certificate. This means that no matter what certificate you use, the connection is treated as though the supplied username is the name of reference for the user. This way things like client-specific overrides apply to the user no matter how they connect. Combining that with the "strict user/cn matching" option makes things more secure as it only allows the connection when both match.

        You could try to remove or comment out this line, but there may be other unintended side effects: https://github.com/pfsense/pfsense/blob/master/src/etc/inc/openvpn.inc#L980

        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 1
        • P
          PhYrE
          last edited by

          Thank you. Will check it out. Reading more, seems I’m not the only one ( https://forum.netgate.com/topic/120215/pfsense-2-3-4_1-username-as-common-name/5 ). I’m curious why this isn’t an interface option, as it seems it would be really useful. A feature request maybe?

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

            It could be turned into a GUI option, but thus far nobody has taken the time to do it. We'd also have to locate and warn against the possible negative side effects of doing that.

            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
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.