Chryzo's Notepad

October 21, 2011

OpenVPN and AD authentication

Filed under: OpenVPN,Windows — Chryzo @ 10:06

Okay, so I setup an openVPN server nice and easy. Found the script on the net to auth against the AD from Jose Ortega: http://sites.google.com/site/amigo4life2/openvpn

However, it was not working on my side for 2 reasons. First, somehow openvpn was passing one argument to the vbs script and second, my user group is not in the same place as my users. The argument passed by openvpn was empty but still it was present thus screwing around with the vbs script which checks for the number of arguments present. Finally, as I was not able to find a “contact me” link on Jose Ortega’s site I am doing this post just in case other people run into the problem.

I did te following modifications:

    In Auth4OpenVPN.ini

  • Added a new DNGROUP variable in order to be able to distinguish User and Group base DN
    In Auth4OpenVPN.vbs

  • In the function AreSettingsOK(), I added the DNGROUP to the parameters array
  • In the function AreSettingsOK(), I incremented the for loop from 4 to 5
  • In the function AreCredentialsOK(), I modified the first test that check for 0 argument and added the following: or Wscript.Arguments.Count = 1 and Wscript.Arguments(0)=”"

Hope it helps others getting OpenVPN 2.2 working with AD and different DNs for users and groups.

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress