On 09/23/2017 10:22 PM, Stephen Davies wrote:
On 05/03/17 12:28, Stephen Davies wrote:
> It looks as if the automatic start may be happening too early in the
> boot process.
I think this is your answer.
Same issue with F25.
The OpenVPN log says:
TCP/UDP: Socket bind failed on local address [AF_INET]126.96.36.199:1194:
Cannot assign requested address.
(188.8.131.52 is the static IP of my server.)
Based on other posts on this issue, I commented the "local 184.108.40.206"
entry in server.conf and the problem seems to have been resolved.
Could somebody please explain to me what is happening here.
Why does a subsequent manual systemctl start openvpn@server work?
Why does removing the local entry help?
Is there a better way out?
If openvpn starts before the network is connected, then it won't be able
to bind to the specific IP address. When you comment it out, you will
probably find that it has bound to the "all interfaces" address instead.
You need to either leave it as it is on all interfaces or make a
change so that it won't start until the network-online unit is done.
There are various ways to do this, just make sure you don't modify the
original service file in /usr/lib/systemd/system. I have recently heard
that you can use a .d directory to make small adjustments to the
service. That would be the simplest and safest if it works.