Page 1 of 1

Static ip addresses

Posted: Mon Oct 11, 2010 1:57 am
by zbenta
Good morning.

I've changed my job to a new company and I "inherited" an openvpn server already configured.
Some clients are configured to have an static ip addresses and all works well.
But there's only one client that gives me a headache because some times it gets a different address than the one he actually was configured for.
when i ping the cliente using his name i get echo replies with a different ip address than the one he was configured with.
Does anyone have any tips regarding this problem?

Re: Static ip addresses

Posted: Mon Oct 11, 2010 7:20 pm
by krzee
for anyone else reading this, the answer is to use --ifconfig-push in a ccd entry for a static ip for the vpn client
example in net30 (default): ifconfig-push 10.8.0.5 10.8.0.6
example in topology subnet or tap: ifconfig-push 10.8.0.5 255.255.255.0

you are likely thinking that using the option --ifconfig-pool-persist is giving static IPs, but it is not.
the option --ifconfig-pool-persist ipp.txt does NOT create static ips, note that the entries in this file are treated by OpenVPN as suggestions only, based on past associations between a common name and IP address. They do not guarantee that the given common name will always receive the given IP address.

Re: Static ip addresses

Posted: Mon Oct 11, 2010 7:20 pm
by krzee
i see you double-posted, so i removed the other post.

Re: Static ip addresses

Posted: Wed Oct 13, 2010 8:53 am
by zespri
I think the other post was mine, not OP's. I solved my problem so no issue with deleting my post, the OP might still need help however.

What helped me is that I didn't realize that mode server is a short cut to a bunch of other options so when I tried to use mode server with ifconfig-pool I got an error. It's not until I realized that I need to substitute mode server with those other options it translates to that my problem was solved.

Re: Static ip addresses

Posted: Wed Oct 13, 2010 8:28 pm
by krzee
oops, sorry if i deleted your post, i thought they were both his
glad you got it handled :D