0

i have openvpn installed on my vps

now what i an trying to do is to let the client have their own ip

as of now when a client connect to my vpn(2.2.2.2 example ip) -they will get the same ip as my server(2.2.2.2).

what i want now is to let them have: 2.2.2.3 or 2.2.2.4 and so on.

for the server and client config: (just look for the client & server config ) http://freenuts.com/how-to-set-up-openvpn-in-a-vps/

1 Answer 1

1

I'm not sure what you did to the example server configuration that will cause the clients to get the same IP as the server, but that's certainly wrong.

Here's the relevant block from the sample configuration:

# Configure server mode and supply a VPN subnet
# for OpenVPN to draw client addresses from.
# The server will take 10.8.0.1 for itself,
# the rest will be made available to clients.
# Each client will be able to reach the server
# on 10.8.0.1. Comment this line out if you are
# ethernet bridging. See the man page for more info.
server 10.8.0.0 255.255.255.0

Did you make the netmask at the end of the server line 255.255.255.255 or something like that?

If you want to specify particular IPs to your clients, you can set up CCD files, where the name of each file is the CommonName on the certificates you've generated for the client.

In the server configuration, add in:

client-config-dir /etc/openvpn/ccd

If your client's certificate is named Client1, then you will have a file /etc/openvpn/ccd/Client that has:

ifconfig-push 10.8.0.101 10.8.0.102

which will cause Client1 to get the VPN IP 10.8.0.101.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .