You are not logged in.
I have a VPN service from Private Internet Access and works perfect with gnome-Network Manager but I have to manually connect at system start up and when waking up from suspend mode. It's not a big thing but I would like to auto-connect all the time. I have added my password to the config file in system connections as it says in the wiki for openvpn but it doesn't auto-connect and instead asks to enter the password again.
Is there an easy way to set auto connect?
best, jose.
Last edited by boina (2014-10-20 21:31:42)
Offline
Bypass NM and just use a service file...
Offline
I actually singed up for this service just the other day. The zip file that provides the ca.crt file also has a number of configs in it as well. They are named *.ovpn, so you will have to rename them so that they are all *.conf, and place them in /etc/openvpn. Otherwise you could go the other route and use drop-in service file modifications on the openvpn@.service file itself.
Offline
Thank you so much guys but my knowledge on these kind of things is very limited close to nothing I guess. I could use some more guide on either option. I guess that in addition to copying these files (###.config) to /etc/openvpn I should do something else?
Thanks in advanced!!!!
Offline
Offline
Edit your VPN file generated by NetworkManager (/etc/NetworkManager/system-connections/<name of VPN connection>) so it looks something like:
[connection]
id=<name of connection>
uuid=<uuid generated by NetworkManager>
type=vpn
[vpn]
service-type=org.freedesktop.NetworkManager.openvpn
connection-type=password
password-flags=0
remote=us-west.privateinternetaccess.com
comp-lzo=yes
reneg-seconds=0
username=<pia username>
remote-cert-tls=server
ca=/etc/openvpn/pia.crt
[vpn-secrets]
password=<secret password>
[ipv4]
method=auto
Then open the nm-connection-editor (Network Connections) and under the 'General' tab for the Wifi network you are attached to, there's a setting to 'Automatically connect to VPN when using this connection'. Pick your VPN connection, and you're all set!
Scott
Edit: for you CLI junkies that like using nmtui, that option doesn't exist there...only in the GUI nm-connection-editor
Last edited by firecat53 (2014-10-19 22:57:13)
Offline
Thanks to you all, I would like the VPN to be active at all time and with roaming connections.
I'm almost there, I followed the wiki and I can connect running:
openvpn /etc/openvpn/US_East.config
(this works perfect)
The problem I have now is when trying to start this connection with systemctl.
Running this:
systemctl status openvpn@US_East.service
The output is the following:
● openvpn@US_East.service - OpenVPN connection to US_East
Loaded: loaded (/usr/lib/systemd/system/openvpn@.service; enabled)
Active: failed (Result: exit-code) since lun 2014-10-20 22:15:17 CEST; 2min 43s ago
Process: 7149 ExecStart=/usr/bin/openvpn --cd /etc/openvpn --config /etc/openvpn/%i.conf --daemon openvpn@%i --writepid /run/openvpn@%i.pid (code=exited, status=1/FAILURE)
oct 20 22:15:17 openvpn[7149]: Options error: In [CMD-LINE]:1: Error opening configuration...conf
oct 20 22:15:17 openvpn[7149]: Use --help for more information.
oct 20 22:15:17 systemd[1]: openvpn@US_East.service: control process exited, code=exited status=1
oct 20 22:15:17 systemd[1]: Failed to start OpenVPN connection to US_East.
oct 20 22:15:17 systemd[1]: Unit openvpn@US_East.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full
There seems to be a failure when launching openvpn but I don't know what could it be.
Any possible help?
Thanks again.
Offline
The error message explains it: the service file expects the config to end in .conf
Offline
Baaa!! what a dumb.....
Working perfectly now!!!
Thank you all
I love arch but I don't know much about computing.
Thanks to all arch forums!!! The best!!!
Offline