LDAP
Author
Discussion

K50 DEL

Original Poster:

9,789 posts

259 months

Monday 4th June 2018
quotequote all
Do we have anyone on PH who knows LDAP well....

I'm having some major issues getting my VPN clients to authenticate via LDAP and am seeing some (I think) odd results from LDAP queries run on my DC.... could use an ear to talk it through with / someone who knows it well to point at where I'm going wrong.

P924

1,272 posts

213 months

Monday 4th June 2018
quotequote all
Hiya.

What do you have running LDAP? is it via Windows AD or SAMBA on linux or..... ?

K50 DEL

Original Poster:

9,789 posts

259 months

Monday 4th June 2018
quotequote all
Trying to get VPN users to authenticate on my AD,

ie: the VPN router looks at our AD and if the user isn't in the specific group then they're not allowed in.



I'm seeing some really strange results at the moment.

My account is a member of the group that I've created and can log in
If I remove that membership then I can no longer log in.
My colleague is the same (we are both in an OU called ICT)
If I create a new user in the ICT OU then they can log in fine.
If I copy a user from a different OU into ICT and give them group membership, they cannot log in

If I add a user in a different OU to the security group then they cannot log in (the error message states that access is denied because the username and/or password is invalid on the domain (I know the details are correct as I've tested them just prior)

It's almost as if LDAP is only looking at the ICT OU and if you're not either a new member of it, or one that's been there ages then it won't authenticate you.

As I said.. a weird one!
Cheers for any assistance, I've been on this for well over a week now!

P924

1,272 posts

213 months

Monday 4th June 2018
quotequote all
in AD ensure view, "advanced features" is enabled, then have a look for a radio button called something like 'dial in' make sure thats set.

I'll try and find the setting im thinking of.

P924

1,272 posts

213 months

Monday 4th June 2018
quotequote all
This is the setting I'm thinking of.




P924

1,272 posts

213 months

Monday 4th June 2018
quotequote all
the other thing it could be is the LDAP Search base, this defines where to start the search for a user / group. it will be something like

cn=ou,cn=higher_ou,dc=domain,dc=domain_tld

make sure the OU the user is in (that doesnt work), is below whatever you have this set to.

K50 DEL

Original Poster:

9,789 posts

259 months

Monday 4th June 2018
quotequote all

Thanks for the help so far, it's enabled me to crystallise exactly what is going wrong but not why, or how to fix it.

So I used your screenshot to sort out where my VPN router was looking to establish LDAP creds and got that setting working just fine.
However, I have a number of user accounts in the same OU, all have the same security group membership, all are set to allow access....

Some connect just fine, some give me an error saying "the port was disconnected"

I can find no difference between the user accounts that will conenct and those that won't and it's always the same ones that connect or don't (ie:user1 always connects, user2 always fails)

rednotdead

1,260 posts

257 months

Monday 4th June 2018
quotequote all
Only time I've seen something similar was down to a licensing issue on the firewall that was also doing the VPN. It had a hard limit of 10 users so number 11 was always binned.

WinstonWolf

72,863 posts

270 months

Monday 4th June 2018
quotequote all
K50 DEL said:
Thanks for the help so far, it's enabled me to crystallise exactly what is going wrong but not why, or how to fix it.

So I used your screenshot to sort out where my VPN router was looking to establish LDAP creds and got that setting working just fine.
However, I have a number of user accounts in the same OU, all have the same security group membership, all are set to allow access....

Some connect just fine, some give me an error saying "the port was disconnected"

I can find no difference between the user accounts that will conenct and those that won't and it's always the same ones that connect or don't (ie:user1 always connects, user2 always fails)
Are you using the same equipment and just swapping the username over? Reduce the number of possible variables...

K50 DEL

Original Poster:

9,789 posts

259 months

Monday 4th June 2018
quotequote all
WinstonWolf said:
K50 DEL said:
Thanks for the help so far, it's enabled me to crystallise exactly what is going wrong but not why, or how to fix it.

So I used your screenshot to sort out where my VPN router was looking to establish LDAP creds and got that setting working just fine.
However, I have a number of user accounts in the same OU, all have the same security group membership, all are set to allow access....

Some connect just fine, some give me an error saying "the port was disconnected"

I can find no difference between the user accounts that will conenct and those that won't and it's always the same ones that connect or don't (ie:user1 always connects, user2 always fails)
Are you using the same equipment and just swapping the username over? Reduce the number of possible variables...
Absolutely - the same equipment, the same Internet connection, same everything except the user accounts - I even set up some test accounts..

Test one - manually created - connects just fine
Test two - copied from test 1 - doesn't connect
Test three - copied from test 2 - connects perfectly.

No hard limits as this is one-at-a-time testing and no time limitations as I've tested accounts both one after another and also leaving hours between tests.

WinstonWolf

72,863 posts

270 months

Monday 4th June 2018
quotequote all
I'd be having a nosey in the Event Logs about now...

captain_cynic

17,667 posts

126 months

Monday 4th June 2018
quotequote all
K50 DEL said:
Do we have anyone on PH who knows LDAP well....

I'm having some major issues getting my VPN clients to authenticate via LDAP and am seeing some (I think) odd results from LDAP queries run on my DC.... could use an ear to talk it through with / someone who knows it well to point at where I'm going wrong.
What are you using as a VPN provider? Windows RRAS? Router based service (Cisco/Juniper/Fortigate)? Usually the issue is with the provider connecting to AD.

Make sure ports 389 (LDAP) and 636 (LDAPS) are available to the provider.

Like WWolf asked, anything in the event logs?

K50 DEL

Original Poster:

9,789 posts

259 months

Monday 4th June 2018
quotequote all
WinstonWolf said:
I'd be having a nosey in the Event Logs about now...
Good idea..... so, Windows logs show nothing at all
Draytek log is pretty good though

I reset the logs on my Draytek and discovered that:

the users who can't login are not getting passed DHCP creds by the VPN connection,
the users who can login are.

There is no other difference in the log files and no reason why that should be the case, the DHCP setting is within the Draytek VPN client and isn't changed between user attempts.

K50 DEL

Original Poster:

9,789 posts

259 months

Monday 4th June 2018
quotequote all
captain_cynic said:
What are you using as a VPN provider? Windows RRAS? Router based service (Cisco/Juniper/Fortigate)? Usually the issue is with the provider connecting to AD.

Make sure ports 389 (LDAP) and 636 (LDAPS) are available to the provider.

Like WWolf asked, anything in the event logs?
I was initially using the Win 10 inbuilt VPN client, Draytek asked me to try their client though, so I've been using that.
As a matter of interest, it doesn't make any difference which VPN client I use, the same users either can or can't login.

See my post above for details on the logs, it seems to be a DHCP issue somehow...

WinstonWolf

72,863 posts

270 months

Monday 4th June 2018
quotequote all
K50 DEL said:
captain_cynic said:
What are you using as a VPN provider? Windows RRAS? Router based service (Cisco/Juniper/Fortigate)? Usually the issue is with the provider connecting to AD.

Make sure ports 389 (LDAP) and 636 (LDAPS) are available to the provider.

Like WWolf asked, anything in the event logs?
I was initially using the Win 10 inbuilt VPN client, Draytek asked me to try their client though, so I've been using that.
As a matter of interest, it doesn't make any difference which VPN client I use, the same users either can or can't login.

See my post above for details on the logs, it seems to be a DHCP issue somehow...
Is Windows providing DHCP? If so have a look in C:\Windows\system32\dhcp to see if there's anything in the logs (Most of my answers will involve logs biggrin )

captain_cynic

17,667 posts

126 months

Monday 4th June 2018
quotequote all
K50 DEL said:
I was initially using the Win 10 inbuilt VPN client, Draytek asked me to try their client though, so I've been using that.
As a matter of interest, it doesn't make any difference which VPN client I use, the same users either can or can't login.

See my post above for details on the logs, it seems to be a DHCP issue somehow...
That depends, if it's using standard PPTP not really, if there's anything non standard about it then use the manufactures client.

Not familiar with Draytek unfortunately. However on the Router, is there an option for DHCP pass-through? If your VPN client isn't getting DHCP, the first place I'd look is to see if it's being passed to it.

K50 DEL

Original Poster:

9,789 posts

259 months

Monday 4th June 2018
quotequote all
captain_cynic said:
K50 DEL said:
I was initially using the Win 10 inbuilt VPN client, Draytek asked me to try their client though, so I've been using that.
As a matter of interest, it doesn't make any difference which VPN client I use, the same users either can or can't login.

See my post above for details on the logs, it seems to be a DHCP issue somehow...
That depends, if it's using standard PPTP not really, if there's anything non standard about it then use the manufactures client.

Not familiar with Draytek unfortunately. However on the Router, is there an option for DHCP pass-through? If your VPN client isn't getting DHCP, the first place I'd look is to see if it's being passed to it.
Yep, there is, and it's all set fine - given approx. 50% of the users I've tested can login just fine I think I'm happy that those settings are OK

Server DHCP logs on my DC say
"Packet dropped because of client ID hash mismatch or standby server"


yajeed

5,057 posts

285 months

Monday 4th June 2018
quotequote all
K50 DEL said:
Yep, there is, and it's all set fine - given approx. 50% of the users I've tested can login just fine I think I'm happy that those settings are OK

Server DHCP logs on my DC say
"Packet dropped because of client ID hash mismatch or standby server"
99% of the time, it's simpler than that. The message you describe isn't necessarily an issue. Do you have more than 1 DHCP server? If you do, are both working correctly generally?

K50 DEL

Original Poster:

9,789 posts

259 months

Tuesday 5th June 2018
quotequote all
yajeed said:
99% of the time, it's simpler than that. The message you describe isn't necessarily an issue. Do you have more than 1 DHCP server? If you do, are both working correctly generally?
Indeed, both my DCs are DHCP servers with scope etc mirrored between them, never had an issue with it in 2.5yrs

K50 DEL

Original Poster:

9,789 posts

259 months

Tuesday 5th June 2018
quotequote all
To update this further, the log file on the draytek notes (for the users that fail) that the DHCP XID being returned is different from what was expected and that's why a DHCP address isn't being issued and the VPN tunnel isn't being created......

I've paused both DHCP servers in turn to test whether there is a config issue somewhere but the client still get that same XID error