LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-26-2017, 05:08 AM   #1
untitled
LQ Newbie
 
Registered: Sep 2017
Posts: 12

Rep: Reputation: Disabled
Difficulties with setting up OpenVPN


Hello everyone,

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.

Thanks in advance.

U.
 
Old 09-26-2017, 09:02 AM   #2
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Hi, Welcome to the forum.

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)

rob

Last edited by brobr; 09-26-2017 at 03:08 PM.
 
Old 09-26-2017, 04:39 PM   #3
untitled
LQ Newbie
 
Registered: Sep 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Dear Rob,

Thank you for your help.

I will follow the pointers you mentioned and I will report back with the results.

U.
 
Old 10-08-2017, 10:54 AM   #4
untitled
LQ Newbie
 
Registered: Sep 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Hello everyone,

I haven't managed to get openvpn to work, even with rob's post above.

Can someone please direct me on right path?

Thanks in advance.

Ulrich.
 
Old 10-08-2017, 11:53 AM   #5
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
Originally Posted by untitled View Post
I will report back with the results.
Hi Ulrich, what exactly did you do?

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:

Code:
sudo /usr/sbin/openvpn --cd /etc/openvpn/ --config /etc/YOUR_WANTED_CONNECTION.ovpn
(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]'

hth

Last edited by brobr; 10-08-2017 at 12:05 PM.
 
Old 10-14-2017, 09:10 AM   #6
untitled
LQ Newbie
 
Registered: Sep 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Hey rob, for the life of me I can't get it to work;

I followed your advice, i followed the set-up vpn guide on slackware.org and although it all sounds trivial I can't make it to work.

I will post back if I end up fixing it.

Thank you for your help nevertheless.

Ulrich.
 
Old 10-14-2017, 10:54 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

Welcome to LQ!

Try the references at; https://docs.slackware.com/howtos:ne...ices:openvpn?s

Hope this helps.
Have fun & enjoy!
 
Old 10-14-2017, 06:07 PM   #8
Aeterna
Senior Member
 
Registered: Aug 2017
Location: Terra Mater
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,008

Rep: Reputation: Disabled
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

Last edited by Aeterna; 10-14-2017 at 06:08 PM.
 
Old 10-15-2017, 08:19 AM   #9
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
Originally Posted by untitled View Post
Hey rob, for the life of me I can't get it to work;

I followed your advice, i followed the set-up vpn guide on slackware.org and although it all sounds trivial I can't make it to work.

I will post back if I end up fixing it.

Thank you for your help nevertheless.

Ulrich.
Which vpn-provider are you subscribing to?? I have used Nord-vpn and PIA, both work fine via openvpn
 
Old 10-16-2017, 04:49 PM   #10
untitled
LQ Newbie
 
Registered: Sep 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by brobr View Post
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.

Thank you all.

Ulrich.
 
Old 10-16-2017, 08:19 PM   #11
v3g4n
LQ Newbie
 
Registered: Mar 2017
Distribution: Slackware
Posts: 18

Rep: Reputation: 3
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?
Code:
openvpn --config /etc/myvpn.ovpn
It should then ask for you username and password.
 
Old 10-18-2017, 12:45 PM   #12
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 974

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
Originally Posted by untitled View Post
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?
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 View Post
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.

hth

Last edited by brobr; 10-18-2017 at 12:51 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up OpenVPN? JosephS Linux - Networking 4 04-03-2015 03:06 PM
Help setting up openVPN server esso82 Linux - Newbie 8 06-19-2014 07:14 PM
Setting up openVPN for a LAN sysman Linux - Networking 4 02-04-2012 06:31 AM
setting up openvpn 2.0 watts3000 Linux - Networking 0 03-04-2008 07:00 AM
Mandrake 9.2 LAN connection difficulties in a large University setting goofyheadedpunk Linux - Networking 3 12-09-2003 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration