Preventing multiple logins
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 9
- Joined: Fri Oct 05, 2012 9:35 pm
Preventing multiple logins
[This has been moved to Authentication Scripts]
Hi,
I have installed OpenVPN System Based On User/Password Authentication with mysql & Day Control (shell script) on centos 6 64 bit.
to install I followed this tutorial : http://chagridsada.blogspot.fr/2011/01/ ... rpass.html
It is perfectly setup and I have tested it with multiple servers.
But now I can have multiple logins with the same account. So how should I prevent this?
I want to limit to maximum of 1 login per account.
Please help me
Many thanks ,
Arjun
Hi,
I have installed OpenVPN System Based On User/Password Authentication with mysql & Day Control (shell script) on centos 6 64 bit.
to install I followed this tutorial : http://chagridsada.blogspot.fr/2011/01/ ... rpass.html
It is perfectly setup and I have tested it with multiple servers.
But now I can have multiple logins with the same account. So how should I prevent this?
I want to limit to maximum of 1 login per account.
Please help me
Many thanks ,
Arjun
- xauen
- Forum Team
- Posts: 80
- Joined: Tue May 10, 2011 7:57 pm
- Location: Manila, Philippines
- Contact:
Re: Preventing multiple logins
well, you have 2 options here:
1. Use a client connect/disconnect script on the openvpn server that triggers 1 if user is "online" and triggers a 0 if the user has been "offline" and an sql checking on the script to read the database.
If user1 is online (meaning 1 in the database table) then exit 1 (afaik its reject user) else exit 0
Option 2: (little harder though much more flexible)
2. Setup radius+mysql authentication for openvpn and set Simultaneous-Use = 1 in the radgroupcheck table.
Either of them is usable for your purpose.
1. Use a client connect/disconnect script on the openvpn server that triggers 1 if user is "online" and triggers a 0 if the user has been "offline" and an sql checking on the script to read the database.
If user1 is online (meaning 1 in the database table) then exit 1 (afaik its reject user) else exit 0
Option 2: (little harder though much more flexible)
2. Setup radius+mysql authentication for openvpn and set Simultaneous-Use = 1 in the radgroupcheck table.
Either of them is usable for your purpose.
"Never be bullied into silence. Never allow yourself to be made a victim. Accept no ones definition of you"
-IDK
-IDK
-
- OpenVpn Newbie
- Posts: 9
- Joined: Fri Oct 05, 2012 9:35 pm
Re: Preventing multiple logins
HI
thanks for your reply
I tried the first one but sometimes in case of improper disconnection , the script doesn't return user_online=0 even though i have kept "keepalive 5 30" so user remains online according to the database and hence can't relogin
can you please provide a link for tutorial of mysql+radius+openvpn installation?
thanks for your reply
I tried the first one but sometimes in case of improper disconnection , the script doesn't return user_online=0 even though i have kept "keepalive 5 30" so user remains online according to the database and hence can't relogin
can you please provide a link for tutorial of mysql+radius+openvpn installation?
- xauen
- Forum Team
- Posts: 80
- Joined: Tue May 10, 2011 7:57 pm
- Location: Manila, Philippines
- Contact:
Re: Preventing multiple logins
put:
on udp config only
my tutorial on using radius-mysql will be available soon when im a little free.
Code: Select all
explicit-exit-notify 2
my tutorial on using radius-mysql will be available soon when im a little free.
"Never be bullied into silence. Never allow yourself to be made a victim. Accept no ones definition of you"
-IDK
-IDK
-
- OpenVpn Newbie
- Posts: 9
- Joined: Fri Oct 05, 2012 9:35 pm
Re: Preventing multiple logins
Thanks a lot man
waiting for your tutorial
please make it as detailed as possible
waiting for your tutorial
please make it as detailed as possible
-
- OpenVpn Newbie
- Posts: 9
- Joined: Fri Oct 05, 2012 9:35 pm
Re: Preventing multiple logins
it wont start now
tried to restart openvpn but it fails to
I am using it in server mode so I presume it can't be used in it
any fix for it?
tried to restart openvpn but it fails to
I am using it in server mode so I presume it can't be used in it
any fix for it?
- xauen
- Forum Team
- Posts: 80
- Joined: Tue May 10, 2011 7:57 pm
- Location: Manila, Philippines
- Contact:
Re: Preventing multiple logins
sorry I forgot to tell you it should be in the client config UDParjunking wrote:it wont start now
tried to restart openvpn but it fails to
I am using it in server mode so I presume it can't be used in it
any fix for it?
"Never be bullied into silence. Never allow yourself to be made a victim. Accept no ones definition of you"
-IDK
-IDK
-
- OpenVpn Newbie
- Posts: 9
- Joined: Fri Oct 05, 2012 9:35 pm
Re: Preventing multiple logins
thanks it worked
but now i have installed freeradius
didn't know how to add accounts in freeradius so installed daloradius
and now i added a user in daloradius and i am getting auth fail error
any idea on how to use daloradius with openvpn? any tutorial links will be welcomed
but now i have installed freeradius
didn't know how to add accounts in freeradius so installed daloradius
and now i added a user in daloradius and i am getting auth fail error
any idea on how to use daloradius with openvpn? any tutorial links will be welcomed
- xauen
- Forum Team
- Posts: 80
- Joined: Tue May 10, 2011 7:57 pm
- Location: Manila, Philippines
- Contact:
Re: Preventing multiple logins
arjunking wrote:thanks it worked
but now i have installed freeradius
didn't know how to add accounts in freeradius so installed daloradius
and now i added a user in daloradius and i am getting auth fail error
any idea on how to use daloradius with openvpn? any tutorial links will be welcomed
This might help! http://safesrv.net/setup-freeradius-plu ... pn-source/
For more information on Freeradius and how to customize it please consult with Daloradius and Freeradius documentation.
"Never be bullied into silence. Never allow yourself to be made a victim. Accept no ones definition of you"
-IDK
-IDK
-
- OpenVpn Newbie
- Posts: 9
- Joined: Fri Oct 05, 2012 9:35 pm
Re: Preventing multiple logins
thanks for your fast reply
i followed this tutorial but now i am stuck.
i don't know how to add the user.
this tutorial no where explains how to add an openvpn user
please help
i am sorry for so many questions
or please suggest me a simpler control panel than daloradius
i followed this tutorial but now i am stuck.
i don't know how to add the user.
this tutorial no where explains how to add an openvpn user
please help
i am sorry for so many questions
or please suggest me a simpler control panel than daloradius
- xauen
- Forum Team
- Posts: 80
- Joined: Tue May 10, 2011 7:57 pm
- Location: Manila, Philippines
- Contact:
Re: Preventing multiple logins
As i've said, you need to customize the radius database and radius configuration based on your openvpn setup.arjunking wrote:thanks for your fast reply
i followed this tutorial but now i am stuck.
i don't know how to add the user.
this tutorial no where explains how to add an openvpn user
please help
i am sorry for so many questions
or please suggest me a simpler control panel than daloradius
This is not a freeradius and daloradius support forum so you can only get support from their respective community.
http://freeradius.org/doc/
since the topic is all about radius and authentication system I have moved this topic to Authentication Scripts forum.
"Never be bullied into silence. Never allow yourself to be made a victim. Accept no ones definition of you"
-IDK
-IDK
-
- OpenVpn Newbie
- Posts: 9
- Joined: Fri Oct 05, 2012 9:35 pm
Re: Preventing multiple logins
someone please help me
i am getting auth failed error
i am getting auth failed error
- xauen
- Forum Team
- Posts: 80
- Joined: Tue May 10, 2011 7:57 pm
- Location: Manila, Philippines
- Contact:
Re: Preventing multiple logins
Please refer to Freeradius documentation on how to customize and link your MySql db to Radius system.
"Never be bullied into silence. Never allow yourself to be made a victim. Accept no ones definition of you"
-IDK
-IDK