Static IP addresses for OpenVPN clients
-
Ok, so I'm trying to do this as well. I am trying to change the client specific override for a Windows machine, and I'm not following exactly what to do.
In Common Name field I have my user's certificate CN entered.
In the Advanced field I have tried:
ifconfig-push 192.158.2.7 192.168.2.0; Where 192.168.2.7 is the desired IP, and 192.168.2.0 is the tunnel network for my OpenVPN.
Also tried
ifconfig-push 192.168.2.7 192.168.2.1; incase the .1 was the server address or something odd.ifconfig-push 192.168.2.7/30 192.168.2.0/24; no luck
192.168.2.4/30; according to what the article above said (in advanced space).
So, if someone can tell me what values go where, I would appreciate it. Each time I try and reconnect, I get 192.168.2.2 as my client IP no matter what I do.
Thanks,
-
I split your post off from the other topic, it's not really related and that was a very old thread.
Don't use ifconfig-push, just fill in the Tunnel Network on the override page and let the firewall work out the details.
If you are using tun in net30 mode, enter 192.158.2.4/30 (.7 isn't valid in that case) – this translates to "ifconfig-push 192.158.2.6 192.158.2.5";
If you are using tun in topology subnet mode or tap, enter 192.158.2.7/24 -- this translates to "ifconfig-push 192.158.2.7 255.255.255.0";
In the latter case the second parameter is a subnet mask, not a network address like you were attempting to use.
-
If you are using tun in topology subnet mode or tap, enter 192.158.2.7/24 – this translates to "ifconfig-push 192.158.2.7 255.255.255.0";
Golden ;D
Thanks.
-
HINT: Don't forget to reload / restart your OpenVPN server, after chancing CCD / User specific config.