how to set static ip for openvpn client

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
dharanikumarsrvn
OpenVpn Newbie
Posts: 12
Joined: Wed Sep 09, 2015 3:39 am

how to set static ip for openvpn client

Post by dharanikumarsrvn » Wed Sep 09, 2015 3:45 am

In the man page of openvpn it was mentioned that in order to create static ip 10.8.0.2 for a client with common name "CLIENT1", a file named "CLIENT1" (Same as common name) needs to be created in the client config directory. And in the file

Code: Select all

ifconfig-push 10.8.0.2 10.8.0.3
needs to be added. My client is running windows. When i start using this configuration, i am getting

Code: Select all

"offset is outside the bounds error"
Can anyone highlight the syntax of ifconfig-push and why 10.8.0.3 is added to it? By the way if i replace 10.8.0.3 with 255.255.0.0 (my netmask), client is running perfectly. Thank you

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: how to set static ip for openvpn client

Post by Traffic » Mon Sep 14, 2015 12:00 pm

Do you use --topology subnet in your server config ?

Post Reply