Clientside - Specifying a DHCP IP?

All comments and questions related to the functionality of the OpenVPN web pages and forum should go here.

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

Post Reply
Veego
OpenVpn Newbie
Posts: 7
Joined: Sun Apr 01, 2012 7:14 pm

Clientside - Specifying a DHCP IP?

Post by Veego » Tue May 29, 2012 12:27 am

Hello OpenVPN support forum,

I have recently switched OpenVPN providers (again), and was wondering if it was possible to specify/prefer/change my DHCP IP from my clientside config?
---------------------------------------------
Preliminary info:
I am using Win7 64-bit
I have OpenVPN GUI and all other openvpn services set to "Run as Administrator"
Anything marked <removed> was removed by me (not reflected in actual config)
I changed some DCHP IPs, you'll notice them being 10.x.x.x, 10.x.x.y, and 10.z.z.z
---------------------------------------------
Log:
This is the log line of interest

Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.x.x.x/255.255.255.252 on interface {<removed>} [DHCP-serv: 10.x.x.y, lease-time: <removed>]

---------------------------------------------
My config:

client
dev tun
proto tcp-client
remote <removed>
port <removed>
ca <removed>.crt
cert <removed>.crt
key <removed>.key
cipher <removed>
resolv-retry infinite
nobind
persist-key
persist-tun
ns-cert-type server
nobind
reneg-sec 0
win-sys 'env'
route-method exe
route-delay 2
redirect-gateway def1
comp-lzo
verb 1
mute 20
keepalive <removed>

---------------------------------------------

Can I put something like a 'route' command in my config to get assigned a particular "Assigned IP: 10.z.z.z" from the server?
Note: This isn't the actual "IP address" of the server, just the DHCP IP it assigns me (the client) - that's what I'm attempting to change

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Clientside - Specifying a DHCP IP?

Post by janjust » Tue May 29, 2012 9:50 am

the openvpn server assigns you an IP and there's little you can do to change that... on Linux you could pull some very elaborate stunts to use a different addresss (using iptables) but on Windows no such luck.

Post Reply