SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I am a new member to the slackware users community, and I am having some problems on setting up my openvpn which I hope you could help me with.
I already followed the few guides I found online, but so far I can't make it to work.
I downloaded the certificates from my vpn provider and added them to the network manager, yet when i try to connect to the vpn i get the following;
Failed to activate connection;
Missing VPN Plugin; // Which I think I installed properly from stackbuilds
Connection deactivated;
Connection activated;
Failed to add connection;
Device failed;
Failed to request scan;
If any of you could be of some help, I would very much appreciate it.
Here some pointers; hope they help you resolve the issue
1) Do you have
Quote:
nm-openvpn:x:320:
in /etc/group?
2) Is the gateway correct ([vpn-server address]:[port number])?
3) Did you add all the required login/passwords etc. apart from the certificate?
4) Also you might need to add DNS addresses to /etc/resolv.conf to get leak-free access to the web
BTW, you could add all possible DNS addresses -work,-home LAN,-vpn to /etc/resolv.conf and make it immutable (man chattr) so that it does not get overwritten automatically when you get a connection from somewhere (note that this immutability could prevent connection when you get on a 'new' network that sets/needs its own DNS)
Maybe best to try first using a script/command in the terminal (bypassing netmanager). That will give you error messages that help with problem-solving.
For this to work you have to point openvpn to a config file you normally get/download from your vpn-provider and copy to /etc/openvpn. Also see man openvpn
This simple command I used before I moved to netmanager to get to my vpn's:
(Change 'YOUR_WANTED_CONNECTION' to the vpn-connection you want to establish)
(changing the work directory to /etc/openvpn might be needed as the config could call other files in there, see below)
To the .ovpn config file provided by your vpn, but this could depend on your vpn-provider, you can add lines such as:
Code:
auth-user-pass auth.txt
auth-nocache
in which auth.txt is a second file in /etc/openvpn (owned by root:root; no rw for others) with two lines:
[your-vpn-login]
[your-vpn-passwd]
When the command runs you get a lot of info about establishing the connection.
For terminating the connection:
In another terminal get the pid of openvpn and then run 'sudo kill [pidofopenvpn]'
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,008
Rep:
I would assume that you have got/downloaded ovpn from your provider.
in such case no need for any modifications changing groups etc.
just start openvpn in terminal (never bothered with GUI or vpn provided clients)
cd /etc/openvpn && sudo openvpn config_file_from_your_provider.ovpn &
important make sure that *.ovpn file is located in /etc/openvpn
change default gateway:
sudo route add default gw xxx.xxx.xxx.xxx
gateway is provided by VPN provider
adjust /etc/resolv.conf
add new nameserver address
add # in fron of existing nameserver (if you don't you will have issues with dns leaks when reconnecting)
above works in all linux distros, BSDs I tested including slackware
Which vpn-provider are you subscribing to?? I have used Nord-vpn and PIA, both work fine via openvpn
Using expressvpn at the moment.
On the first day i installed slackware i downloaded and installed the network-manager(openvpn) from slackbuilds because I thought that i needed it to use my vpn, only after i read at the slackware website that slackware 14.2 already comes with openvpn pre-installed. Do you think there can be some misconfiguration because of it?
I am still trying to figure it out.
I downloaded a few different .ovpn files from my provider and none of them works;
when I ran sudo /usr/sbin/openvpn --cd /etc/openvpn/ --config /etc/myvpn.ovpn i always get an AUTH=FAILED, i just can't figure it out why, since it seems so trivial. (i double checked the configurations info from the .ovpn file and the key, certificates and other miscellaneous all seem to be correct.
Slackware does come with openvpn already installed, but does not have NetworkManager-openvpn out of the box, which it looks like you already know about. I don't use expressvpn, but what I have done with my vpn provider is move my .ovpn, .crt and .pem files to /etc/openvpn. I then used NetworkManager to import the .ovpn file, point it to /etc/openvpn for the .crt file and insert my username and password in the required fields. What happens when you run the following as root, assuming your .ovpn is named "myvpn.ovpn" like how you have it in your example?
On the first day i installed slackware i downloaded and installed the network-manager(openvpn) from slackbuilds because I thought that i needed it to use my vpn, only after i read at the slackware website that slackware 14.2 already comes with openvpn pre-installed. Do you think there can be some misconfiguration because of it?
Hi Ulrich that is the openvpn-plugin for network-manager; it will expand network-manager to allow for setting up an openvpn-connection via its gui. It uses the openvpn install that comes with Slackware. It won't affect using openvpn from a terminal.
Quote:
Originally Posted by untitled
when I ran sudo /usr/sbin/openvpn --cd /etc/openvpn/ --config /etc/myvpn.ovpn i always get an AUTH=FAILED.
Authorization is not controlled by the .ovp files as downloaded from the provider. (They often offer an 'app' that uses these .ovpn files to make connection with the server to use but will not include your personal details; these apps will ask separately for your login and password. These apps won't work on Slackware and are not needed, but you still need to provide these details by yourself. (When using the networkmanager-plugin you get the 'app'-behaviour as nm will store your details (right-click/edit-connections/ then set-up your new vpn)
For use from the commandline you can put these details in another file, say "/etc/openvpn/auth.txt", and edit the .ovpn file to call that other file, as I pointed out in an earlier post:
Quote:
..add lines such as:
Code:
auth-user-pass auth.txt
auth-nocache
The file "auth.txt" is a second file in /etc/openvpn (owned by root:root; no rw for others) with two lines:
[your-vpn-login]
[your-vpn-passwd]
If you're using network-manager the .ovpn files would not need to be edited as the auth-details are put in when setting up the new vpn connection via the gui.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.