Community Support Forum
 
  OpenVPN.net  •  Forum Index  •  FAQ  

It is currently Wed May 16, 2012 2:58 pm




Post new topic Reply to topic  [ 2 posts ] 
 Create user authentication Openvpn Win Server 
Author Message
 Post subject: Create user authentication Openvpn Win Server
PostPosted: Mon Feb 13, 2012 9:11 pm 
OpenVpn Newbie

Joined: Mon Feb 13, 2012 9:02 pm
Posts: 1
Hello,

i'm trying to make an user & password authentication on my openvpn server installed on my PC running windows 7.

i know i have to use a verification script but i don't know how to write it.

here is my server.conf

Code:
## server.ovpn ##
port 80
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"

push "dhcp-option DNS 8.8.8.8"
keepalive 10 120
comp-lzo
max-clients 4
persist-key
persist-tun
status openvpn-status.log
verb 3
auth-user-pass-verify auth-pam.pl via-file
script-security 3
tmp-dir C:\\tmpvpn
client-cert-not-required
username-as-common-name


i try to use the sample script which is in the linux version of openvpn but when a client connect to the server i got this error


Mon Feb 13 22:08:24 2012 10.211.55.2:54803 openvpn_execve: CreateProcess auth-pam.pl failed: %1 n’est pas une application Win32 valide. (errno=193)
Mon Feb 13 22:08:24 2012 10.211.55.2:54803 TLS Auth Error: user-pass-verify script failed to execute: auth-pam.pl
Mon Feb 13 22:08:24 2012 10.211.55.2:54803 TLS Auth Error: Auth Username/Password verification failed for peer
Mon Feb 13 22:08:24 2012 10.211.55.2:54803 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA
Mon Feb 13 22:08:24 2012 10.211.55.2:54803 [] Peer Connection Initiated with 10.211.55.2:54803
Mon Feb 13 22:08:26 2012 10.211.55.2:54803 PUSH: Received control message: 'PUSH_REQUEST'
Mon Feb 13 22:08:26 2012 10.211.55.2:54803 Delayed exit in 5 seconds
Mon Feb 13 22:08:26 2012 10.211.55.2:54803 SENT CONTROL [UNDEF]: 'AUTH_FAILED' (status=1)
Mon Feb 13 22:08:26 2012 10.211.55.2:54803 Connection reset, restarting [0]

i think the script work just on linux but i search on google during one week and i find nothing about ovpn windows script :( .

My question is how to make a simple script which verify the identity of my client by looking there username & password and compare them to a list of user/password allowed to connect to my server.

Thank you & sorry for my english :roll:


Offline
 Profile  
 
 Post subject: Re: Create user authentication Openvpn Win Server
PostPosted: Thu Feb 16, 2012 9:10 am 
I should be on the dev team.
User avatar

Joined: Fri Aug 20, 2010 2:57 pm
Posts: 2083
Location: Amsterdam
A perl script is not considered a valid executable by Windows:
Quote:
openvpn_execve: CreateProcess auth-pam.pl failed: %1 n’est pas une application Win32 valide. (errno=193)


try adding
Code:
script-security 3 system

and make sure that your auth-pam.pl script can be run on the Windows command prompt command line.

_________________
JJK / Jan Just Keijser
http://www.nikhef.nl/~janjust/vpn/OpenVPN2-Cookbook/index.html
http://www.nikhef.nl/~janjust/vpn/OpenVPN2-Cookbook/errata.html


Offline
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


 Who is online 

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


phpBB SEO
[ Time : 0.060s | 11 Queries | GZIP : On ]

 
Index  |  FAQ


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group