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

RADIUS vs LDAP for AD authentication for OpenVPN

Scheduled Pinned Locked Moved OpenVPN
39 Posts 5 Posters 29.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.
  • B
    BloodyIron
    last edited by Nov 18, 2013, 9:56 PM

    So I plan to setup an OpenVPN server in pfSense, but I'm a little unclear on something.

    I want to have OpenVPN access delegated by our Active Directory domain. I see two ways this is done.

    1. Setup auth through a RADIUS server that then auths through Active Directory

    2. Setup auth through LDAP that directly queries Active Directory

    Now, both seem to fulfill the needs I have, but #2 seems to be more straight-forward.

    Is there any good reason to use RADIUS instead of LDAP in this particular regard? Can anyone speak on the pros/cons of each? I don't see why LDAP queries would be an issue, but I am curious if RADIUS would offer something I would not see in LDAP queries.

    Lend me your brains.

    1 Reply Last reply Reply Quote 0
    • A
      abidkhanhk
      last edited by Nov 19, 2013, 3:19 PM

      @BloodyIron:

      1. Setup auth through LDAP that directly queries Active Directory

      actually I am also looking for a similar solution, having to maintain 3 diff passwords on our network is pissing off a lot of ppl in my office. lol

      1 Reply Last reply Reply Quote 0
      • R
        Rob Pomeroy
        last edited by Nov 19, 2013, 8:38 PM

        @BloodyIron:

        Is there any good reason to use RADIUS instead of LDAP in this particular regard?

        You might find that RADIUS suits you better if you're allowing VPN connections from machines that have never joined your network - especially if you're using Network Access Protection or other granular remote access policies.  You may also want to use it if you've deployed RADIUS for other systems (non Microsoft routers, for example).  Combine all your network authentication needs in one place.

        Personally I'd go for LDAP/Active Directory (which is what I'm doing right now).  Simple set-up.

        1 Reply Last reply Reply Quote 0
        • B
          BloodyIron
          last edited by Nov 19, 2013, 8:40 PM

          When using LDAP or RADIUS for authentication with openVPN, are users prompted for login/password when connecting? We use another openVPN implementation where it doesn't, and I'm not familiar with the expected behavior with LDAP/RADIUS.

          Thanks for the info :)

          @Rob:

          @BloodyIron:

          Is there any good reason to use RADIUS instead of LDAP in this particular regard?

          You might find that RADIUS suits you better if you're allowing VPN connections from machines that have never joined your network - especially if you're using Network Access Protection or other granular remote access policies.  You may also want to use it if you've deployed RADIUS for other systems (non Microsoft routers, for example).  Combine all your network authentication needs in one place.

          Personally I'd go for LDAP/Active Directory (which is what I'm doing right now).  Simple set-up.

          1 Reply Last reply Reply Quote 0
          • R
            Rob Pomeroy
            last edited by Nov 19, 2013, 8:45 PM

            @BloodyIron:

            When using LDAP or RADIUS for authentication with openVPN, are users prompted for login/password when connecting?

            I'm in a proof of concept phase at the moment, so I'm not sure how much this can be tweaked.  I can say for sure that when firing up the OpenVPN client, as I have configured it on a Windows 7 machine, there's a username/password prompt.  The username doesn't require a domain part.  There's probably a configuration option to pre-fill the username?

            Ideally I'd like to aim for what the native Windows VPN client is capable of: pass through the currently logged-on user's domain credentials.  Not sure if that's even possible though - I suspect Kerberos credentials are used in that instance.

            Then after that, I'll be investigating whether it's possible to establish the VPN connection before (and as part of) log on to the computer.  Single sign on effectively.  I'm sure there will be documentation about that - just haven't got to it yet.

            1 Reply Last reply Reply Quote 0
            • G
              Garfield000
              last edited by Jan 30, 2014, 11:25 AM

              @Rob:

              @BloodyIron:

              Is there any good reason to use RADIUS instead of LDAP in this particular regard?

              You might find that RADIUS suits you better if you're allowing VPN connections from machines that have never joined your network - especially if you're using Network Access Protection or other granular remote access policies.  You may also want to use it if you've deployed RADIUS for other systems (non Microsoft routers, for example).  Combine all your network authentication needs in one place.

              Personally I'd go for LDAP/Active Directory (which is what I'm doing right now).  Simple set-up.

              Hi Rob,

              You say it's a simple set-up.
              Can you tell me what steps to follow? Since everything I tried doesn't work.

              I'm trying to setup an vpn-connection via openvpn that authenticates by active directory.
              It works already when not authenticating by active directory.
              I believe this is what you are talking about.

              1 Reply Last reply Reply Quote 0
              • R
                Rob Pomeroy
                last edited by Jan 30, 2014, 11:44 AM

                Sure.  From the OpenVPN: Server page, I clicked the "Wizards" and followed that through.  I do recall that the LDAP configuration wasn't entirely intuitive.  So here are a few settings that work for me, with a Windows 2008 domain controller:

                • Protocol version: 3

                • Search scope: entire subtree

                • BaseDN: DC=Our domain,DC=local

                • Authentication containers: OU=Our users,DC=Our domain,DC=local

                • Bind credentials: a dedicated "domain user" account

                • User naming attribute: samAccountName

                • Group naming attribute: cn

                • Group member attribute: memberOf

                Have you managed to get authentication working?  Are you on a recent release of pfSense?

                1 Reply Last reply Reply Quote 0
                • G
                  Garfield000
                  last edited by Jan 30, 2014, 12:37 PM

                  authentication is working. (Diagnostics -> Authentication -> Test)

                  2.1-RELEASE (i386)
                  built on Wed Sep 11 18:16:22 EDT 2013
                  FreeBSD 8.3-RELEASE-p11

                  1 Reply Last reply Reply Quote 0
                  • R
                    Rob Pomeroy
                    last edited by Jan 30, 2014, 12:50 PM

                    Okay, good.

                    Next, these are some of the settings I needed on my OpenVPN configuration:

                    • Server mode: Remote Access (User Auth)

                    • Backend for auth: obviously the LDAP connection configured earlier

                    • Protocol: UDP

                    • Device mode: tun

                    • Interface: the WAN interface

                    • Local port: 1194

                    • TLS auth: enabled; certificate shown in the next box

                    • Peer certificate auth, etc.: the one configured by the wizard

                    • IPv4 tunnel network: here I used a network that does not exist on the internal network.  Internally, we use 10.12.0.0/16, so here I entered 192.168.20.0/24.  Doesn't really matter what you use as long as it's from a private range and doesn't overlap any other network.

                    • Redirect gateway: disabled (no check mark)

                    • IPv4 local network: 10.12.0.0/16, see above

                    • Dynamic IP: checked

                    • Address pool: checked

                    • DNS/NTP stuff: everything here was from the LAN side

                    • NetBIOS: not checked

                    1 Reply Last reply Reply Quote 0
                    • G
                      Garfield000
                      last edited by Jan 30, 2014, 2:48 PM

                      Thanks for the help
                      Now it works !!

                      1 Reply Last reply Reply Quote 0
                      • R
                        Rob Pomeroy
                        last edited by Jan 30, 2014, 2:56 PM

                        Ah, brilliant!

                        1 Reply Last reply Reply Quote 0
                        • G
                          Garfield000
                          last edited by Jan 30, 2014, 3:16 PM

                          Oh, now the next problem…

                          when I have a VPN-connection and I try to go to our server I can't use its name, I have to use the IP-adress.
                          At the Openvpn-server-configuration on PfSense I checked "Provide a DNS server list to clients" and I placed our internal DNS-server in that list.

                          1 Reply Last reply Reply Quote 0
                          • R
                            Rob Pomeroy
                            last edited by Jan 30, 2014, 3:43 PM

                            Do you have an "allow all" rule on the OpenVPN network?  (You probably do, if you used the wizard.)  Sounds like DNS traffic isn't being allowed through the tunnel for some reason.

                            You could possibly enable NetBIOS over TCP/IP in the OpenVPN server settings.  That would enable the remote computer to fall back to WINS if DNS isn't working.  I think I usually choose "H-node", but experiment perhaps.  You can also switch on "Redirect Gateway", if you prefer all traffic to go via your LAN's gateway while the tunnel's established.

                            Mind you, if DNS isn't working, you'll probably have a lot of other problems too.

                            1 Reply Last reply Reply Quote 0
                            • G
                              Garfield000
                              last edited by Jan 30, 2014, 4:34 PM

                              It looks it has something to do with dns-suffix's

                              when I set the dns-suffix in the network-connection settings, it works.
                              or when i go to \server.domain.local instead of \server it works.

                              Is there are way this is not necessary?

                              1 Reply Last reply Reply Quote 0
                              • R
                                Rob Pomeroy
                                last edited by Jan 30, 2014, 4:37 PM

                                Ah okay.  Yeah, your remote workstation does need to know the full domain somehow.  Sounds like you've cracked it?

                                1 Reply Last reply Reply Quote 0
                                • G
                                  Garfield000
                                  last edited by Jan 31, 2014, 7:23 AM

                                  Looks like I did  :)
                                  I did set the "Provide a default domain name to clients"
                                  but there I only placed our domain, not domain.local

                                  Now it's working. Thanks a lot !!

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    Rob Pomeroy
                                    last edited by Jan 31, 2014, 8:10 AM

                                    Cool.  Good work.

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      BloodyIron
                                      last edited by Mar 10, 2014, 6:39 PM

                                      Adding to the original topic of this thread, my testing so far is very successful with using LDAP to auth against AD. I haven't yet found a reason to use RADIUS over LDAP, and RADIUS seems like added work.

                                      I'll try to post more information as it comes.

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        Rob Pomeroy
                                        last edited by Mar 11, 2014, 1:17 PM

                                        You'd probably want RADIUS for granular NAP/VPN quarantine, I'd think.

                                        1 Reply Last reply Reply Quote 0
                                        • B
                                          BloodyIron
                                          last edited by Mar 11, 2014, 4:10 PM

                                          Where I'm stuck now is figuring out how to get pfSense to only allow members of a domain group to successfully connect, not just rely on the cert.

                                          @Rob:

                                          You'd probably want RADIUS for granular NAP/VPN quarantine, I'd think.

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received