Client authentication based on user password and server

How to customize and extend your OpenVPN installation.
Post Reply
sokalsondha
OpenVpn Newbie
Posts: 1
Joined: Sat Mar 09, 2019 4:23 am

Client authentication based on user password and server

Post by sokalsondha » Sat Mar 09, 2019 4:45 am

Dear members
I am very new in the openvpn. And I am enjoying this very much.
I am planning to use openvpn for a project.
And whole thing will be username and password based authentication.
I create a bash script and create a file call user.pass file and I put username and passwords are there.
So with default config file my clients can connect.
I have 3 ovpn server in three locations.
Yesterday I heard about freeradius and daloradius.
I find them more interesting. So I install them. And connect my all 3 servers in the freeradius. (Actually my friend helped me on this)
So now I don't need bash script to verify username and password. Now I create username and password in the mysql db and I can use any of the server with one single username .

But here is the problem. I want to put my clients to in a specific server. So the scenario is.

One my client from UK bought VPN from me so I create username for him in the mysql and I put him in my UK server. But I want he only can access to UK server by using the username and password provide by me. I don't want if he try the other server he will failed to login.

But at the moment when I create username and password in my radius server mysql I can see he can use all 3 servers by that single username and password.

But I don't want. I want to put them in a specific server.
So more simply.
A client Mr john buy vpn from me. And I supply him user password and a client config file. ( There is ovpn server IP address in the config file..so all I want if Mr john try to access to server from my other 2 server config file(ovpn file then our radius will refuse him to connect. He only can connect from the ovpn file I have him.

Also which command for open VPN in putty to check the concurrent session,? I mean which user is connected now.

Please please help me.

Post Reply