Community Support Forum
 
  OpenVPN.net  •  Forum Index  •  FAQ  

It is currently Thu Feb 23, 2012 4:02 am




Post new topic Reply to topic  [ 2 posts ] 
 [ASK] Client-disconnect not run openvpn with mysql 
Author Message
 Post subject: [ASK] Client-disconnect not run openvpn with mysql
PostPosted: Sat Jan 28, 2012 6:28 am 
OpenVpn Newbie

Joined: Sat Jan 28, 2012 5:59 am
Posts: 1
I have a vpn which i manage with mysql for authentication. In the server config file, i have client-connect and client-disconnect script path to run when user connect and disconnect to the vpn.

to make authentication works, i use libpam-mysql. For the script in /etc/pam.d/vpn, i make authentication WHERE=disable=0 AND WHERE=online=0. This means that if the client is not disable and not online, he/she can connect to the vpn. so, the authentication was success and client can connect to the vpn, client-connect script also run as i needed. When the user disconnect, the client-disconnect will run. Still happen as i wanted.

The problem happen when client`s internet is accidently dead. client-connect script contain database access that will set user to online ("UPDATE client SET online=1 WHERE username='$common_name'"). And client disconnect will set user to offline ("UPDATE client SET online=0 WHERE username='$common_name'"). If the client`s internet is accidently dead, client-disconnect will not run and mysql will not update the user. So, the user will cannot connect back after their internet restored, pam authentication will deny because /etc/pam.d/vpn rules state that the user can connect if user that connect have online=0.

So, how can i overcome this?
I have put explicit-exit-notify 2 in client config, but the result is still the same. thanks in advance and sorry for my english.


Offline
 Profile  
 
 Post subject: Re: [ASK] Client-disconnect not run openvpn with mysql
PostPosted: Thu Feb 09, 2012 1:27 pm 
OpenVpn Newbie

Joined: Thu Feb 09, 2012 1:26 pm
Posts: 1
look like same problem to me :|

bump


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 1 guest


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.056s | 11 Queries | GZIP : On ]

 
Index  |  FAQ


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