How to setup PPTP manually?

Tom Horsley horsley1953 at gmail.com
Fri May 18 13:56:18 UTC 2012


On Fri, 18 May 2012 15:29:06 +0200
Zoltan Boszormenyi wrote:

> Can someone help me with manual PPTP configuration?

Start with:

yum install pptp pptp-setup

That gets you the pptpsetup command (and a man page)
which allows you to configure the pptp connection
info. But actually connecting is a bit tricky to do
manually. You need to manually add routing rules
and fix resolv.conf to point to a server that
knows the names of the remote systems
(at least I need to with the pptp server I connect
to). Here's the script I use (which you'll need to
modify for the network you connect to):

#!/bin/bash
#
# Bring up the ccur VPN connection
#
remoteip=`ifconfig ppp0 | fgrep 'P-t-P:' | sed -e 's/^.* P-t-P://' -e 's/ Mask:.*$//'`
if [ -z "$remoteip" ]
then
   pppd call ccur updetach
   remoteip=`ifconfig ppp0 | fgrep 'P-t-P:' | sed -e 's/^.* P-t-P://' -e 's/ Mask:.*$//'`
   if [ -n "$remoteip" ]
   then
      route add -net 10.134.30.0 netmask 255.255.255.0 gw $remoteip
      route add -net 10.134.60.0 netmask 255.255.255.0 gw $remoteip
      route add -net 129.75.24.0 netmask 255.255.255.0 gw $remoteip
      cp -f /etc/resolv.conf.ccur /etc/resolv.conf
   else
      echo AAUGH CCUR-VPN-UP FAILURE
   fi
fi


More information about the users mailing list