10.7. Connecting Linux Clients to a PPTP Server
Problem
You want to connect your Linux PC to a Windows or Linux PPTP server.
Solution
No problem, just install the pptp client, and away you go. On Debian:
# aptitude install pptp-linuxOn Fedora:
# yum install pptpYour /etc/ppp/options.pptp file should have these options:
##/etc/ppp/options.pptp lock noauth refuse-eap refuse-chap refuse-mschap nobsdcomp nodeflate require-mppe-128
Then, enter your password and login in /etc/ppp/chap-secrets:
##/etc/ppp/chap-secrets # client server secret IP addresses foober server1 tuffpassword *
If you are authenticating to a Windows RAS server, you'll need the domain name:
alrac.net\\foober server1 tuffpassword *
Next, create a
/etc/ppp/peers/$TUNNEL
file. In this example, the tunnel name is server1:
##/etc/ppp/peers/server1 pty "pptp rasserver --nolaunchpppd" name alrac.net\\foober remotename server1 require-mppe-128 file /etc/ppp/options.pptp ipparam server1
Using the venerable old pon/poff commands starts and stops the tunnel manually:
$ pon server1
$ poff server1The pon command with these options makes it run in the background:
$ pon provider updetach && pon server1 updetachYou can alias this to save a bit of typing:
$ alias vpn1on='pon provider updetach && pon server1 updetach'
$ alias vpn1off='poff server1'Now, typing vpn1 will get you
connected, and vpn1off closes the
connection.
Discussion
All Linux window managers and desktops have ways to attach a custom command to a menu icon so you can start and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access