Static ip addresses

This forum is for admins who are looking to build or expand their OpenVPN setup.

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

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
zbenta
OpenVpn Newbie
Posts: 1
Joined: Mon Oct 11, 2010 1:44 am

Static ip addresses

Post by zbenta » Mon Oct 11, 2010 1:57 am

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?

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: Static ip addresses

Post by krzee » Mon Oct 11, 2010 7:20 pm

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.

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: Static ip addresses

Post by krzee » Mon Oct 11, 2010 7:20 pm

i see you double-posted, so i removed the other post.

zespri
OpenVpn Newbie
Posts: 5
Joined: Fri Oct 08, 2010 6:30 pm

Re: Static ip addresses

Post by zespri » Wed Oct 13, 2010 8:53 am

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.

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: Static ip addresses

Post by krzee » Wed Oct 13, 2010 8:28 pm

oops, sorry if i deleted your post, i thought they were both his
glad you got it handled :D

Post Reply