TAP Adapter IP changes automatically after service or server restarts

This forum is for general conversation and user-user networking.
Post Reply
bonnybros
OpenVpn Newbie
Posts: 4
Joined: Mon Oct 16, 2017 5:57 pm

TAP Adapter IP changes automatically after service or server restarts

Post by bonnybros » Fri Feb 23, 2018 8:55 pm

i have been facing a strange problem in my openvpn setup. It runs perfectly when the Windows server 2012 R2 is up. But the issue happens when server restarts. Or lets say if i go and restart the service (2nd time). It uses the virtual IP (10.8.0.1) and the configuration is exactly similar to what is their in OpenVPN community. It automatically changes to a different IP starts with 169.x.x.x and in the description it says Auto Configuration enabled. When this change happens i wont be able to ping using the server IP 10.8.0.1, of course because the IP is different now. In that case i need to set the IP manually as 10.8.0.1 and gateway as 10.8.0.2 to make it work again. Has anybody come across a strange situation like this?

I am really pissed off due to this. Is there anyway to stop this happening again?

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 4808
Joined: Fri Jun 03, 2016 1:17 pm

Re: TAP Adapter IP changes automatically after service or server restarts

Post by TinCanTech » Fri Feb 23, 2018 9:29 pm

Sounds like a dhcp problem ..

bonnybros
OpenVpn Newbie
Posts: 4
Joined: Mon Oct 16, 2017 5:57 pm

Re: TAP Adapter IP changes automatically after service or server restarts

Post by bonnybros » Fri Feb 23, 2018 9:32 pm

TinCanTech wrote:
Fri Feb 23, 2018 9:29 pm
Sounds like a dhcp problem ..
Thanks for replying. DHCP is Auto & handling by Windows 2012 server. Did i miss something else to configure in OpenVPN?

bonnybros
OpenVpn Newbie
Posts: 4
Joined: Mon Oct 16, 2017 5:57 pm

Re: TAP Adapter IP changes automatically after service or server restarts

Post by bonnybros » Tue Feb 27, 2018 5:45 pm

I could solve it by adding these details.

proto udp4
Specifies to use IPv4 on the UDP protocol for better clarity to system and prevents an error in the server's OpenVPN log which states "Could not determine IPv4/IPv6 protocol. Using AF_INET6"

ip-win32 netsh
Allows a manual configuration of the IP during OpenVPN server startup

Tested it many times and i couldnt reproduce the same issue. Seems i got it solved. Thanks!

Post Reply