Receiving the same Client IP all the time

Got a problem with Viscosity or need help? Ask here!

twoxbasic

Posts: 3
Joined: Mon Jan 11, 2016 8:41 pm

Post by twoxbasic » Sun Nov 27, 2016 4:54 am
I connect via UDP/TUN and would like to receive the same Client IP. Is it possible?

ifconfig x.x.x.x y.y.y.y
I used this, but I think I did something wrong.

James

User avatar
Posts: 2313
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Mon Nov 28, 2016 8:24 am
Hi twoxbasic,

You don't want to manually set your IP address on the client-side if the OpenVPN server isn't set up to expect this. It'll typically result in a non-functional connection.

If you want to use the ifconfig command client-side you'll want to turn off IP address assignment on the OpenVPN server. Alternatively you can simply set up the OpenVPN server to give you the same IP address every time. The easiest method to do this on the OpenVPN server is to use the "ifconfig-pool-persist" command with a long expiry time. See the "--ifconfig-pool-persist" entry at:
https://community.openvpn.net/openvpn/w ... n23ManPage

Alternatively you can use the "client-config-dir" command on the server coupled with a ifconfig-push option for your client. This gives you the greatest control, but it is a little more complex to set up.

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs
2 posts Page 1 of 1