No subject


Sun Jun 2 12:36:39 EDT 2013


http://personal.rdu.bellsouth.net/rdu/t/a/tayljl/linux-pptp-client/linux-ppt
p-client-setup.html

===
Setting up the Linux PPTP Client
After spending multiple hours pulling out hair, digging through newsgroups,
etc., I finally have the Linux PPTP client up and running with a Microsoft
PPTP server.  I wrote this documentation to hopefully save other people some
time.  I am using RedHat 6.2, so you may have to adjust the instructions
according to your distro...
PPP (and MSCHAPv2/MPPE) Installation
Update PPP using Jeff Blaize's PoPToP (the Linux PPTP server) instructions.
After step 5, make the following changes before proceeding to step 6.
  1.. Open up /usr/src/ppp-2.3.8/linux/ppp.c and make the following change:
    --- drivers/net/ppp.c~        Wed Apr 12 19:56:45 2000
    +++ drivers/net/ppp.c Wed Apr 12 20:28:39 2000
    @@ -2560,7 +2560,7 @@
          wake_up_interruptible (&ppp->read_wait);
          if (ppp->tty->fasync != NULL)
    -             kill_fasync (ppp->tty->fasync, SIGIO);
    +             kill_fasync (ppp->tty->fasync, SIGIO, POLL_IN);
          return 1;
     }
  2.. Apparently, the kinstall script doesn't install the rc4.h and
rc4_enc.h files, but it will _update_ them if they already exist.  The fix
for me was to copy them into the kernel build directory
(/usr/src/linux/drivers/net) before running kinstall.sh.
Note that the configuration files for the client are different.  Sample
/etc/ppp/options file for using PPTP client:
    lock
    debug
    noauth
    mppe-40
    mppe-128
    mppe-stateless
You'll probably want to remove the debug option once everything is working.
Sample /etc/ppp/chap-secrets file:

    # Secrets for authentication using CHAP
    # client        server          secret                  IP addresses
    jsmith          pptpserver      password
The PPTP server I'm connecting to gives me an address on the 10.0.0.0
network.  I prefer to keep my default route so that the PPTP connection only
gets packets headed to the 10.0.0.0 network.  To do this, just add a route
after the connection is up.  On RedHat, this is done via the
/etc/ppp/ip-up.local file:
    #!/bin/bash
    # This script is called with the following options:
    #
    #   0 name of this script
    #   1 interface-name
    #   2 tty-device
    #   3 speed
    #   4 local-IP-address
    #   5 remote-IP-address
    # add route
    /sbin/route add -net 10.0.0.0 netmask 255.0.0.0 gw $5 $1

Sample /etc/hosts file:

    192.168.0.1     pptpserver
PPTP Client Installation
  1.. Grab PPTP-Linux v1.0.2.
  2.. There is a bug in the PPTP client that shows up if you are behind a
Linux masquerading firewall (may show up behind other firewalls too - not
sure).  Here is the fix (in file pptp.c):
130c130
<   pptp_gre_copy(call_id, peer_call_id, pty_fd, inetaddr);
---
>   pptp_gre_copy(peer_call_id, call_id, pty_fd, inetaddr);
Sample pptp-up script:
    #!/bin/bash
    /usr/sbin/pptp pptpserver name jsmith remotename pptpserver
Sample pptp-down script:
    #!/bin/bash
    killall pppd
    killall pptp
Wrap-Up
At this point, you should be ready to try and connect to your server.  Just
run the pptp-up script as root.  If it doesn't work, check your logfiles
(check /etc/syslog.conf to make sure you are capturing the output).
If everything works or if I've made some errors, please let me know.





More information about the TriLUG mailing list