On 24/09/17 15:10, Samuel Sieb wrote:
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]203.2.199.1:1194:
Cannot assign requested address.
(203.2.199.1 is the static IP of my server.)
Based on other posts on this issue, I commented the "local 203.2.199.1"
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.
Absolutely correct!
I created an alternative unit in /etc/systemd/system with "After
network-online.target" and uncommented the "local 203.2.199.1" configuration
entry and all now works as expected.
Cheers and thanks,
Stephen
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx