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

    FreeRADIUS simultaneous connection not working for OpenVPN

    Scheduled Pinned Locked Moved General pfSense Questions
    17 Posts 5 Posters 1.8k 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.
    • M
      MacUsers
      last edited by MacUsers

      Hi again!
      I use the RADIUS (v3) authentication for one of the OpenVPN servers and two of the users on that VPN need multiple connections from the same a/c. So, under FreeRADIUS > Users > theUser I set Number of Simultaneous Connections to 2 and then for the IP Address I used the following settings:
      403a6340-0894-4d04-b2f2-1a30a34c7ddb-image.png
      and that + sign at the end seems causing the RADIUS service to be crashed and stopped. If I don't provide any IP at all, the user gets the same IP for both of his sessions, which is causing a different issue on the client side. What am I doing wrong here?
      My main goal is to provide two separate IPs for two simultaneous sessions from the same account. any idea how do I do that?

      -San

      1 Reply Last reply Reply Quote 0
      • NogBadTheBadN
        NogBadTheBad
        last edited by NogBadTheBad

        There is no mention of the + here:-

        https://freeradius.org/rfc/rfc2865.html#Framed-IP-Address

        I'm wondering if its valid.

        I'd be tempted to create an account for each user, if one of them does something you would be able to tie it down to a specific user.

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        1 Reply Last reply Reply Quote 0
        • M
          MacUsers
          last edited by MacUsers

          I already have individual a/c per user and that's not the problem. One of the users needs to connect to the VPN from two places at the same time and I want him to connect with two different IPs - that's the issue.

          NogBadTheBadN 1 Reply Last reply Reply Quote 0
          • NogBadTheBadN
            NogBadTheBad @MacUsers
            last edited by NogBadTheBad

            @MacUsers

            Give them an account with the same password per machine, just tack on the machine name after the user id.

            Not ideal I know but it will work.

            Screenshot 2020-01-10 at 14.35.08.png

            Andy

            1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

            M 1 Reply Last reply Reply Quote 0
            • M
              MacUsers @NogBadTheBad
              last edited by MacUsers

              @NogBadTheBad,
              okay, I understand now what you mean. and yeah, not ideal at all. That also means, for me, managing two certs, two MFA etc. for the same user. I'm doing a bit more reading to see if I'm missing anything. In one of the posts, I see someone have mentioned it needs accounting enabled, which I already have.
              Also hard to believe pfSense has that things so wrong, for such a long time.

              -S

              1 Reply Last reply Reply Quote 0
              • NogBadTheBadN
                NogBadTheBad
                last edited by NogBadTheBad

                I spent a few hours trying to get it to work and couldn't, in the freeradius documentation ippool is mentioned, it might help ?

                https://wiki.freeradius.org/modules/Rlm_ippool

                https://wiki.freeradius.org/guide/Ippool-and-radius-client

                I was just trying to split my /24 into 2 x /25, the first /25 having access to everything and the last /25 access ti the internet only.

                It's a bit of a PITA having to define a unique ip address for each user.

                Andy

                1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                1 Reply Last reply Reply Quote 0
                • M
                  MacUsers
                  last edited by

                  Can anyone from the pfSense team confirm if the format of the continues IP address format (e.g. 10.0.51.5+), as suggest, is correct or not? It's still hard for me to believe that it's flawed and overlooked for such a long time, versions after version. Any one?

                  -San

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

                    You need to take into account how OpenVPN works.
                    It assigns an IP based on common name.
                    Maybe the following diagrams can shed some light on this:
                    https://community.openvpn.net/openvpn/wiki/AvoidRoutingConflicts
                    https://community.openvpn.net/openvpn/wiki/HowPacketsFlow

                    Also look at --duplicate-cn in the manual:
                    https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage

                    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

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

                      This has nothing to do with RADIUS and everything to do with OpenVPN not wanting you to connect with the same user+cert multiple times.

                      In the OpenVPN server settings, check the box to allow duplicate connections.

                      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!

                      M NogBadTheBadN 2 Replies Last reply Reply Quote 0
                      • M
                        MacUsers @jimp
                        last edited by MacUsers

                        @jimp said in FreeRADIUS simultaneous connection not working for OpenVPN:

                        This has nothing to do with RADIUS and everything to do with OpenVPN not wanting you to connect with the same user+cert multiple times.

                        In the OpenVPN server settings, check the box to allow duplicate connections.

                        if you mean this:e8c2667f-9e43-41d8-8072-8b5ab0ddfaa6-image.png
                        then its already there. And you probably miss in my 1st post that OVPN connection wise it's absolutely fine, if I keep the IP address field empty. But both of the sessions get the same IP, which is a problem on the client side network.

                        As I also said, if I follow what is suggested in-line for the simultaneous connection settings, freeRADIUS fails to start. Don't think it's a fair to say that nothing to do with [pfSense implementation of] RADIUS, IMO.

                        -San

                        1 Reply Last reply Reply Quote 0
                        • M
                          MacUsers @Pippin
                          last edited by MacUsers

                          @Pippin said in FreeRADIUS simultaneous connection not working for OpenVPN:

                          Also look at --duplicate-cn in the manual:
                          https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage

                          I think --duplicate-cn is the same thing that @jimp suggested above? I already have that checked and hence I can make two connections, I believe??

                          -San

                          1 Reply Last reply Reply Quote 0
                          • NogBadTheBadN
                            NogBadTheBad @jimp
                            last edited by

                            @jimp said in FreeRADIUS simultaneous connection not working for OpenVPN:

                            This has nothing to do with RADIUS and everything to do with OpenVPN not wanting you to connect with the same user+cert multiple times.

                            In the OpenVPN server settings, check the box to allow duplicate connections.

                            How about IPsec?

                            Andy

                            1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                            1 Reply Last reply Reply Quote 0
                            • stephenw10S
                              stephenw10 Netgate Administrator
                              last edited by

                              Hmm, almost impossible to find any reference to that notation in Radius. The only thing I can see is from the GNU Radius manual:

                               If this attribute is present in the RHS and has the value of Yes, then the value of NAS-Port-Id attribute from the authentication request will be added to the value of Framed-IP-Address attribute from the RHS, and resulting value will be returned in Framed-IP-Address attribute to the NAS.
                              
                              This provides the simplest form of organizing IP address pools.
                              
                              This attribute is implicitly added to the RHS when the value of a Framed-IP-Address attribute ends with `+' sign. For example the following:
                              
                                          Framed-IP-Address = 10.10.0.1+
                              
                              is equivalent to
                              
                                          Framed-IP-Address = 10.10.0.1,
                                          Add-Port-To-IP-Address = Yes
                              

                              I'm guessing that is no longer supported. Hard to see how it would ever have been in the context of that comment.
                              It might also not be relevant to the OpenVPN plugin, PPPoE may work with that for example. I have not tried. And by the looks of it hardly anyone has since, as you say, that comment has been there for a long while.

                              Steve

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                MacUsers @stephenw10
                                last edited by MacUsers

                                @stephenw10
                                I think, I also tried the same thing a yr. or so ago and filed but that time I carried on with some other important things. Now, this time I really need to do some thing about it. Any thing else can you think of to supply two different IPs (dedicated or otherwise) for two simultaneous sessions from the same user, other than creating two a/c for the same user, as @NogBadTheBad suggested?
                                Anyone can think of any other trick(s)?

                                -San

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

                                  Setup another server instance for those two users, check duplicate-cn and do not use CSO for that server.

                                  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

                                  NogBadTheBadN 1 Reply Last reply Reply Quote 0
                                  • NogBadTheBadN
                                    NogBadTheBad @Pippin
                                    last edited by

                                    @Pippin said in FreeRADIUS simultaneous connection not working for OpenVPN:

                                    Setup another server instance for those two users, check duplicate-cn and do not use CSO for that server.

                                    You can't have two instance of an IPsec VPN can you ?

                                    Andy

                                    1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      You can't have two mobile IPSec servers, no. But this is OpenVPN, you can have as many instances as you have ports/resources.

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