LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-02-2019, 12:20 PM   #1
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" & Xfce.
Posts: 4,461
Blog Entries: 1

Rep: Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778
Restoring VPN Connections in Slackware.


A search hasn't returned anything useful on this subject.

Every time I do a fresh install I have to re-create each vpn connection, one by one. It doesn't matter that I backed them and restored them, the NetworkManager software (with the openvpn plug-in) doesn't see them.

Anyone know the secret to restoring the connections?


Thanks.

Last edited by cwizardone; 02-02-2019 at 12:21 PM.
 
Old 02-02-2019, 05:59 PM   #2
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
I'm not using any automagic network manager, don't trust them, instead keeping it simple and unitary, using /etc/rc.d/rc.inet2 for the advanced networking stuff.
Just after starting the firewall, that's putting the chastity belt on first:
Code:
if [ -x /etc/rc.d/rc.firewall ]; then
  /etc/rc.d/rc.firewall start
fi
- create your own script for advanced stuff - routing&tunneling
Code:
# Start the advanced net stuff
if [ -x /etc/rc.d/rc.advnet ]; then
 /etc/rc.d/rc.advnet
fi
- /etc/rc.d/rc.advnet content - example
Code:
#!/bin/sh
# routing & co
#Start tunneling
/usr/sbin/openvpn /etc/vpns/openvpn0.conf
/usr/sbin/openvpn /etc/vpns/openvpn1.conf
/usr/sbin/openvpn /etc/vpns/openvpn2.conf
/usr/sbin/openvpn /etc/vpns/openvpn3.conf
#....
 
2 members found this post helpful.
Old 02-02-2019, 09:20 PM   #3
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,505

Rep: Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621
The connection profiles are located in the /etc/NetworkManager/system-connections/ directory, so make sure you back that up to preserve the necessary.
 
1 members found this post helpful.
Old 02-02-2019, 09:51 PM   #4
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" & Xfce.
Posts: 4,461

Original Poster
Blog Entries: 1

Rep: Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778
Quote:
Originally Posted by ferrari View Post
The connection profiles are located in the /etc/NetworkManager/system-connections/ directory, so make sure you back that up to preserve the necessary.
Yes, that is the directory that each time has been backed up and later restored.
 
Old 02-04-2019, 01:50 AM   #5
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,505

Rep: Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621
Just in case the following thread is useful to you...

https://superuser.com/questions/8638...pt-command-lin
 
1 members found this post helpful.
Old 02-06-2019, 09:49 AM   #6
Regnad Kcin
Member
 
Registered: Jan 2014
Location: Beijing
Distribution: Slackware 64 -current .
Posts: 184

Rep: Reputation: 120Reputation: 120
openvpn incorporated has a very fine and reliable tool for running and connecting vpn's on linux but unfortunately it requires "systemd". I find the documentation on vpn's in general to be highly opaque and resistant. openvpn inc. doesn't much care.

Last edited by Regnad Kcin; 02-06-2019 at 09:55 AM.
 
1 members found this post helpful.
Old 02-06-2019, 02:47 PM   #7
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 733
Blog Entries: 3

Rep: Reputation: 227Reputation: 227Reputation: 227
If you have *.ovpn files provided by your VPN owner/company... you can mass import them using this command:

Code:
# for i in *.ovpn; do nmcli connection import type openvpn file "$i"; done
You'll still have to re-enter the username/password for each one once you first connect however.
 
1 members found this post helpful.
Old 02-08-2019, 11:47 AM   #8
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current with "True Multilib" & Xfce.
Posts: 4,461

Original Poster
Blog Entries: 1

Rep: Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778Reputation: 1778
Quote:
Originally Posted by coralfang View Post
If you have *.ovpn files provided by your VPN owner/company... you can mass import them using this command:

Code:
# for i in *.ovpn; do nmcli connection import type openvpn file "$i"; done
You'll still have to re-enter the username/password for each one once you first connect however.
That is what I've been doing.
First, I backup /etc/NetworkManager (and all its sub-directories) and ditto all the .ovpn files from the VPN.
And, as you have pointed out, once there are all restored, it is still necessary to "re-create" each connection, one by one.
 
Old 02-08-2019, 10:20 PM   #9
FTIO
Member
 
Registered: Mar 2015
Location: Las Vegas, NV
Distribution: Slackware 14.1_32
Posts: 259

Rep: Reputation: 128Reputation: 128
Just put it on your router instead, that way you can have any multiple number of machines going through it and not have to start the vpn for each separate one (I hope that made sense). Install DD-WRT on your router, then setup what you need from your VPN on it.
 
1 members found this post helpful.
Old 02-08-2019, 10:31 PM   #10
Regnad Kcin
Member
 
Registered: Jan 2014
Location: Beijing
Distribution: Slackware 64 -current .
Posts: 184

Rep: Reputation: 120Reputation: 120
Quote:
Just put it on your router instead, that way you can have any multiple number of machines going through it and not have to start the vpn for each separate one (I hope that made sense). Install DD-WRT on your router, then setup what you need from your VPN on it.
__________________
Great idea, but sometimes the VPN needs to be off.

If you are using the VPN to spoof your location, you may need your real location sometimes. It's a hassle to go into the router and turn off the VPN there every time you need to give real location or use "inside the firewall" access.

Actually I am finding that plain old OpenVPN via the network manager is working pretty good for me right now.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
squid drops connections to ip addresses, but allows connections to domain names igoryonya Linux - Networking 4 11-07-2014 06:10 PM
squid drops connections to ip addresses, but allows connections to domain names igoryonya Linux - Networking 2 11-06-2014 11:33 PM
2000 MySQL connections, still "too many connections" newlinuxnewbie Linux - General 0 11-07-2005 02:03 PM
Multiple simultaneous VPN connections? chamitha Linux - General 1 08-28-2002 05:11 AM
VPN Connections itguy Linux - Security 2 05-02-2002 04:10 PM

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

All times are GMT -5. The time now is 03:28 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration