LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-22-2014, 08:24 PM   #1
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Rep: Reputation: 174Reputation: 174
How to establish connection to work VPN


I need to connect to my employer's VPN from my Slackware desktop system at home.

I can connect from my home network on both a Windows 7 laptop of my own, and from a MacBook Air that was issued to me. I set up the Win 7 laptob by duplicating the information from the MacBook. I used the "Setup a connection or network" dialog in the "Network and Sharing Center" in Windows 7, and chose the "Connect to a Workplace" option to set up the VPN connection. After providing the IP address and authentication information, I was able to establish a connection, just like that from the MacBook.

How do I do this from my Slackware desktop system? There doesn't appear to be anything in the default Slackware installation that supports the creation of a VPN connection.

I've installed some packages from Slackbuilds.org, but I don't know what to configure to set up a VPN connection like the one that Windows created. Here are the packages I installed:

Code:
pptp-1.8.0-x86_64-1_SBo
NetworkManager-pptp-0.9.8.4-x86_64-1_SBo
NetworkManager-openvpn-0.9.8.4-x86_64-1_SBo
NetworkManager-vpnc-0.9.8.6-x86_64-1_SBo
sstp-client-1.0.9-x86_64-1_SBo
openconnect-5.01-x86_64-1_SBo
NetworkManager-openconnect-0.9.8.4-x86_64-1_SBo
kde-networkmanagement-openconnect-0.9.0.9-x86_64-1_SBo
It was sort of a shotgun approach. I wasn't sure what I needed, so I installed everything that looked plausible.

I'm not running NetowrkManager on this system, as it's a statically configured desktop with a simple wired LAN connection and no wifi, but I can turn on NetworkManager if it would be helpful for establishing the VPN connection.

I tried using pptp, but I don't really understand what I need to set up. It appears that pptp uses pppd, or else pppd uses pptp. pppd is one of the Slackware default packages. Anyway, reading the man pages for pppd and pptp didn't much clarify it for me.

What do I need to do to define the connection and start it?
 
Old 06-23-2014, 01:51 AM   #2
Mark Pettit
Member
 
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 634

Rep: Reputation: 302Reputation: 302Reputation: 302Reputation: 302
I think you first need to find out what sort of VPN your work runs. That will surely dictate the next steps.
 
Old 06-23-2014, 08:47 AM   #3
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,135

Rep: Reputation: 277Reputation: 277Reputation: 277
Turn on network manager, make sure your desktop is running nm-applet, right-click the applet and configure your vpn from there.

cheers,
 
Old 06-23-2014, 11:37 AM   #4
fatalfrrog
Member
 
Registered: May 2011
Distribution: Slackware
Posts: 57

Rep: Reputation: 31
You may have missed vpnc (and networkmanager-vpnc) in your shotgun blast. I need this for one of my VPNs. I use NetworkManager and it's very easy to set up. It's possible to use strictly command line options (in which case you wouldn't need networkmanager-vpnc) with vpnc, but I don't bother.
 
Old 06-23-2014, 11:50 PM   #5
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Original Poster
Rep: Reputation: 174Reputation: 174
I had a long day at work today, so I haven't had time to try anything new. However, I do know the type of VPN being used. The VPN server is pptpd running on a Linux system. So I've been trying to get the pptp client with ppp working.

Hopefully I'll get some time to play with it a bit more tomorrow and post some debug messages, if I can figure out how to generate them. Or try Network Manager. Where do I find that nm-applet?
 
Old 06-24-2014, 11:32 AM   #6
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,135

Rep: Reputation: 277Reputation: 277Reputation: 277
Quote:
Originally Posted by Z038 View Post
...Where do I find that nm-applet?
It's part of a full install - run it from a terminal to get verbosity, then once you're happy, execute at startup.

cheers,
 
1 members found this post helpful.
Old 06-25-2014, 09:24 PM   #7
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Original Poster
Rep: Reputation: 174Reputation: 174
Hmmmmm. When I started nm-applet, it wiped out my resolv.conf, replacing my local and backup nameserver IP addresses (bind named that I run on this system and another system on my LAN) with 8.8.8.8 (Google's nameserver, I think) and my router's local IP address. Weird. I didn't expect that.

What other settings does nm-applet change?

Last edited by Z038; 06-25-2014 at 09:29 PM.
 
Old 06-26-2014, 05:36 AM   #8
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,135

Rep: Reputation: 277Reputation: 277Reputation: 277
Edit your resolv.conf to reflect the nameservers you wish to use, then:

Code:
# chattr -i /etc/resolv.conf
This makes the file immutable, so that even root can't change it without changing the immutable bit.

cheers,
 
1 members found this post helpful.
Old 06-26-2014, 05:56 AM   #9
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Original Poster
Rep: Reputation: 174Reputation: 174
Perfect! Thanks mrclisdue. By the way, nm-applet fails with an MS-CHAP authorization error like the one I get when I use the pon script from the command line. I going to try changing some of the parms in /etc/ppp/options. I'll post details late tonight.
 
Old 06-26-2014, 09:15 PM   #10
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Original Poster
Rep: Reputation: 174Reputation: 174
Here is the output from the pon script (from ppp 2.4.5) with minor obfuscation of DNS name, userid, etc. The part in red I think is the significant part. E=691 could be a couple of different things. My username and password are definitely correct. Wrong domain? Do Linux-based pptpd servers have a domain?


Code:
# pon work_lab debug dump logfd 2 nodetach
pppd options in effect:
debug           # (from command line)
nodetach                # (from command line)
logfd 2         # (from command line)
dump            # (from command line)
noauth          # (from /etc/ppp/peers/work_lab)
refuse-pap              # (from /etc/ppp/options)
refuse-chap             # (from /etc/ppp/options)
refuse-mschap           # (from /etc/ppp/options)
refuse-eap              # (from /etc/ppp/options)
name z_038              # (from /etc/ppp/peers/work_lab)
remotename work_lab           # (from /etc/ppp/peers/work_lab)
                # (from /etc/ppp/peers/work_lab)
pty pptp lab.workplace.com --nolaunchpppd          # (from /etc/ppp/peers/work_lab)
ipparam work_lab              # (from /etc/ppp/peers/work_lab)
nobsdcomp               # (from /etc/ppp/peers/work_lab)
nodeflate               # (from /etc/ppp/peers/work_lab)
require-mppe-128                # (from /etc/ppp/peers/work_lab)
using channel 14
Using interface ppp0
Connect: ppp0 <--> /dev/pts/4
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xedae99e> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0xc65cd612> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0xc65cd612> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xedae99e> <pcomp> <accomp>]
rcvd [CHAP Challenge id=0x1b <48bde32377d8e59f304f69a395ae82fd>, name = "pptpd"]
sent [CHAP Response id=0x1b <aab4a4eccadf42537840449fa9fc024200000000000000006a001a0db49f4f5b598f94ef3633e7bed2bcc327a7ce33f300>, name = "z_038"]
rcvd [CHAP Failure id=0x1b "E=691 R=1 C=48bde32377d8e59f304f69a395ae82fd V=0 M=Access denied"]
MS-CHAP authentication failed: Access denied
CHAP authentication failed
sent [LCP TermReq id=0x2 "Failed to authenticate ourselves to peer"]
rcvd [LCP TermReq id=0x2 "Authentication failed"]
sent [LCP TermAck id=0x2]
rcvd [LCP TermAck id=0x2]
Connection terminated.
Waiting for 1 child processes...
  script pptp lab.workplace.com --nolaunchpppd, pid 25624
 
Old 06-26-2014, 10:24 PM   #11
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Original Poster
Rep: Reputation: 174Reputation: 174
Ooops. I got it working. It turned out that my password in /etc/ppp/chap-secrets was wrong. It was a long password generated with lots of upper and lower case characters, and it turned out I had the wrong case on one letter. I know I checked it several times, but I just didn't see the typo until now.
 
  


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
Can't Establish Connection L2TP/IPSec VPN nasvi Linux - Security 0 02-21-2014 04:44 PM
VPN (vpnc) connection only seems to work every other time g-man1066 Linux - Networking 0 08-12-2010 09:13 PM
Can't establish tunnel for VPN over SSH wingman358 Linux - Networking 6 07-21-2010 04:28 PM
Proven tool to establish a VPN connection kushanxp Linux - Virtualization and Cloud 3 12-18-2009 04:27 AM
VPN connection to PC @ work robbbert Linux - Networking 4 03-31-2006 01:44 PM

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

All times are GMT -5. The time now is 07:43 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