Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sat Jul 4 05:36:21 2015 OpenVPN 2.3.4 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Dec 1 2014
Sat Jul 4 05:36:21 2015 library versions: OpenSSL 1.0.1k 8 Jan 2015, LZO 2.08
Sat Jul 4 05:36:21 2015 Control Channel Authentication: using '/usr/share/easy-rsa/keys/ta.key' as a OpenVPN static key file
Sat Jul 4 05:36:21 2015 TCP/UDP: Socket bind failed on local address [AF_INET]192.168.1.100:443: Cannot assign requested address
Sat Jul 4 05:36:21 2015 Exiting due to fatal error
If I restart the OpenVPN service once the system has booted, it works perfectly:
Code:
Sat Jul 4 05:52:49 2015 OpenVPN 2.3.4 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Dec 1 2014
Sat Jul 4 05:52:49 2015 library versions: OpenSSL 1.0.1k 8 Jan 2015, LZO 2.08
Sat Jul 4 05:52:49 2015 NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x. Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Sat Jul 4 05:52:49 2015 Control Channel Authentication: using '/usr/share/easy-rsa/keys/ta.key' as a OpenVPN static key file
Sat Jul 4 05:52:49 2015 TUN/TAP device tun0 opened
Sat Jul 4 05:52:49 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Sat Jul 4 05:52:49 2015 /sbin/ip link set dev tun0 up mtu 1500
Sat Jul 4 05:52:49 2015 /sbin/ip addr add dev tun0 local 10.8.0.1 peer 10.8.0.2
Sat Jul 4 05:52:49 2015 GID set to nogroup
Sat Jul 4 05:52:49 2015 UID set to nobody
Sat Jul 4 05:52:49 2015 Listening for incoming TCP connection on [AF_INET]192.168.1.100:443
Sat Jul 4 05:52:49 2015 TCPv4_SERVER link local (bound): [AF_INET]192.168.1.100:443
Sat Jul 4 05:52:49 2015 TCPv4_SERVER link remote: [undef]
Sat Jul 4 05:52:49 2015 Initialization Sequence Completed
Please bare in mind I am still learning the basics of Linux.
I'm wondering if it's because nothing else is configured to make sure network is actually up before network-online.target is reached. For those of us who use NetworkManager, there is a NetworkManager-Wait-Online.service that helps with this. (A ConMan-Wait-Online.service would be nice.) Anyway, you could check this with
Some general workarounds...
1. What you could do is write a script called by a custom service that checks that network connectivity has been established, looping until this condition is met. That could use the ordering
so that the openvpn@server.service only starts when this service has determined that the network is active.
2. The other possible quick and dirty solution might be to introduce a delay in the execution of the command called by openvpn@server.service using the sleep command for example.
Im sorry, I am somewhat new to Linux as well and I have realized that this is my issue as well. My problem now is, I do not quite understand when you say 'edit openvpn@.service'? Where is that file? How do I edit that and add the new line so when system boots, it starts at the correct time?
Okay, I found what I was looking for but it doesn't seem to fix the issue. This is what is happening. Connected to VPN fine, reboot, can't connect, reload VPN, can connect. I thought this topic was exactly the solution and it may be but it doesnt seem to be working. I may be adding it to wrong file or wrong part of file. Help greatly appreciated. Thanks in advance!
Okay, I found what I was looking for but it doesn't seem to fix the issue. This is what is happening. Connected to VPN fine, reboot, can't connect, reload VPN, can connect. I thought this topic was exactly the solution and it may be but it doesnt seem to be working. I may be adding it to wrong file or wrong part of file. Help greatly appreciated. Thanks in advance!
I know I am responding to a very old post but I hope it helps someone:
Edit this file with your text editor, in my case I use nano
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.