I'm running an Ubuntu 14.04.3 LTS server that launches a few things at startup, two of them being OpenVPN for my VPN service and a Dynamic DNS Update Client to update my noip host to my current IP.
I've tried with the official noip DUC and with ddclient (see here why I changed) and both of them incorrectly update to the IP I have before my VPN connects (the ISP IP).
The OpenVPN connection is working when I login via SSH, so it means the DUC reports the IP before OpenVPN is working or something like that. Before asking here, I've tried to modify the init.d script of ddclient with an openvpn requirement :
# Required-Start: $local_fs $remote_fs $network $syslog $openvpn
For rcX.d files, openvpn has something like S16openvpn and ddclient has S99ddclient, so normally ddclient starts after openvpn right ? I'm not really comfortable with those things.
That didn't change anything. I hope someone can help me, it means each time I reboot my server, I have to restart the DUC client service for my noip host to work correctly.
A plan B if nothing can be found is to ask service ddclient to restart after everything has launched, so that I don't have to do it and I won't forget. But of course making ddclient update to the right IP in the first place would be better.
P.S. : If you ask why I want the IP to be the VPN IP, it's because some services like Teamspeak 3 server have to be reachable so my ddns.net must point to the VPN IP, because when pointing to my ISP public IP, they are not reachable anymore (linked to how VPN works I guess).