You are not logged in.
Let met apologize if I'm not clear enough, I'm a newbie and especially in networking..
I am currently subscribing to a vpn provider which provides multiples servers in tcp/udp.
For each server and each protocol, I have an ovpn file and I have also a pem file (which I think is the same for every servers ?).
Up to now, I was used to setup my vpn this way
Open the network manger
Import vpn from config file
Choose the ovpvn file
Specify username, password and pem file
And each time I want to switch server/protocol, I choose another vpn connection in the network manager.
It's working great, but I would like to autotomize this setup because I don't want to specify all the servers using the network manager gui, and it would be great if I could not use the network manager at all.
I have readed the Archlinux OpenVPN configuration page, and as I understood, I have to create a .conf file in /etc/openvpn/client/ for each servers. Could I just put my ovpn files ?
Moreover, I would like to use a gui to switch easily between different servers, I noticed QOpenVPN which seems to be great but I don't know how to use it, there isn't any doc. I scroll through the code and noticed that it was using systemctl openvpn@[client].service so I guess it relates to the conf files ?
Any lead or any link will be very helpfull
Last edited by mindless (2017-03-30 07:10:07)
Offline
Well, first, you should forget about the .ovpn file extension, as you probably already noticed, it's a .conf file for the Linux client.
In /etc/openvpn/client, you can simply add all the client .conf files you like. As for the requirements for them to work, such as certificates and other stuff, I'd personally structure them in separate folders, inside the openvpn/client dir.
Example:
/etc/openvpn/client/
/etc/openvpn/client/vpn_one.conf
/etc/openvpn/client/vpn_two.conf
/etc/openvpn/client/vpn_three.conf
/etc/openvpn/client/vpn_one/
/etc/openvpn/client/vpn_one/vpn_one.crt
/etc/openvpn/client/vpn_one/vpn_one.key
/etc/openvpn/client/vpn_two/
/etc/openvpn/client/vpn_two/vpn_two.crt
/etc/openvpn/client/vpn_two/vpn_two.key
/etc/openvpn/client/vpn_three/
/etc/openvpn/client/vpn_three/vpn_three.crt
/etc/openvpn/client/vpn_three/vpn_three.key
Then simply enable them and start them:
# systemctl enable openvpn-client@vpn-one openvpn-client@vpn-two openvpn-client@vpn-three
# systemctl start openvpn-client@vpn-one openvpn-client@vpn-two openvpn-client@vpn-three
Assuming the .conf files are set correctly, that's all you need.
Personal spot :: https://www.smirky.net/ :: Try not to get lost!
Offline
Ok thanks a lot, I will have a look to create the conf files automatically. I saw openvpn --config ovpnfile but didn't read the doc yet.
Also, the last commands you ran, does it makes the three vpn running simultaneously ?
Offline
Yes, it does. It's up to you to choose how you want to start them and what to trigger that.
I think there's plenty of software that can serve as an openvpn GUI.
Last edited by smirky (2017-03-29 10:56:30)
Personal spot :: https://www.smirky.net/ :: Try not to get lost!
Offline
Yes or I can even do it myself. Thank you smirky If you have any idea of how to convert ovpn to conf, I would like to hear it.
Offline
$ mv file.ovpn file.conf
Personal spot :: https://www.smirky.net/ :: Try not to get lost!
Offline
$ mv file.ovpn file.conf
mv is really the best converter I've every used. It nearly converts everything;-)
scnr
Offline
If I knew that that was working x) Thanks
Offline
Make sure to mark your thread as solved
Personal spot :: https://www.smirky.net/ :: Try not to get lost!
Offline