PPTP Client PPTP Client Red Hat HOWTO 1st May 2002 This HOWTO describes how to install the PPTP Client on Red Hat Linux 6.2. |
You should know the following information about the network into which you are connecting before you begin this procedure. You can probably get this information from the group that supports that network.
You need two RPMs to install PPTP.
Although not a requirement, you can obtain an example site-specific drop-in configuration file that can be set up by you or someone in the support group for the network into which you are tunnelling. (This configuration file can then be used by anyone else who wants to tunnel into that network, significantly automating the setup process.)
Put the RPMs and the drop-in configuration file in some temporary directory (for example, /var/tmp) on your system.
Install the FilesFor Red Hat 6.2, kernel 2.2.x ...
Install both packages at once rpm -Uvh ppp-mppe*.rpm pptp-linux*.rpmFor Red Hat 7.2, kernel 2.4.x ...
Unistall the default ppp package for Redhat 7.2 rpm -e --nodeps ppp Install the ppp-mppe package rpm -i --nodeps ppp-mppe*.rpm You will receive the notice that the module wasn't located. Follow the instructions provided with the notice to build the kernel module, then follow the instructions provided from the kernel module build to install the new module. Install the pptp-linux package rpm -i --nodeps pptp-linux*.rpm Edit the /etc/modules.conf file, and change the entry: alias char-major-108 ppp to: alias char-major-108 ppp_genericSet Up PPTP with the Command Script
The PPTP command script, pptp-command, lets you:
[yoursys pptp]# pptp-command
The script runs and displays the following list. Choose item 3:
1.) start 2.) stop 3.) setup 4.) quit What task would you like to do?: 3
1.) List CHAP secrets 2.) Add a New CHAP secret 3.) Delete a CHAP secret 4.) List PPTP Tunnels 5.) Add a NEW PPTP Tunnel 6.) Delete a PPTP Tunnel 7.) Configure resolv.conf 8.) Select a default tunnel 9.) Quit ?: 2
The script displays your choice, together with information about specifying a local name:
Add a NEW CHAP secret. NOTE: Any backslashes (\) must be doubled (\\). Local Name: This is the 'local' identifier for CHAP authentication. NOTE: If the server is a Windows NT machine, the local name should be your Windows NT username including domain. For example: domain\\username Local Name: your_domain\\your_username
Remote Name: This is the 'remote' identifier for CHAP authentication. In most cases, this can be left as the default. If must be set if you have multiple CHAP secrets with the same local name and different passwords. Just press ENTER to keep the default. Remote Name [PPTP]:
Password: This is the password or CHAP secret for the account specified. The password will not be echoed. Password: your_password Adding secret your_domain\\your_username PPTP *****
1.) List CHAP secrets 2.) Add a New CHAP secret 3.) Delete a CHAP secret 4.) List PPTP Tunnels 5.) Add a NEW PPTP Tunnel 6.) Delete a PPTP Tunnel 7.) Configure resolv.conf 8.) Select a default tunnel 9.) Quit ?: 5
If the drop-in configuration file was not completed and installed, the only tunnel displayed is "Other" and you must choose 1. If the configuration file was previously completed and installed, the script displays the list of tunnels specified in that file. This step assumes no configuration file; otherwise, select the tunnel you want and go to step 8.
Note that the rest of this step shows example values that are for illustration only. Do not specify these example values; instead use those that are correct for your network connection.
Add a NEW PPTP Tunnel. 1.) Other Which configuration would you like to use?: 1 Tunnel Name: my_work_tunnel Server IP: 192.168.0.1 What route(s) would you like to add when the tunnel comes up? This is usually a route to your internal network behind the PPTP server. You can use TUNNEL_DEV and DEF_GW as in /etc/pptp.d/ config file TUNNEL_DEV is replaced by the device of the tunnel interface. DEF_GW is replaced by the existing default gateway. The syntax to use is the same as the route(8) command. Enter a blank line to stop. route: add -host 16.47.207.244 gw DEF_GW route: add -net 16.0.0.0/8 TUNNEL_DEV route:
Local Name and Remote Name should match a configured CHAP secret. Local Name is probably your NT domain\username. NOTE: Any backslashes (\) must be doubled (\\). Local Name: your_domain\\your_username Remote Name [PPTP]: Adding my_work_tunnel - 192.168.0.1 - your_domain\\your_username - PPTP Added tunnel my_work_tunnel 1.) List CHAP secrets 2.) Add a New CHAP secret 3.) Delete a CHAP secret 4.) List PPTP Tunnels 5.) Add a NEW PPTP Tunnel 6.) Delete a PPTP Tunnel 7.) Configure resolv.conf 8.) Select a default tunnel 9.) Quit ?: 7
If you have used a configuration file, choose the option that is not "Other" (that option is displayed by the configuration file) and go to Step 10.
If you have not used a configuration file, choose "Other", which prompts for more information (do not use the examples shown here):
Use a PPTP-specific resolv.conf during tunnel connections? [Y/n]: 1.) Other Which configuration do you want to use?: 1 What domain names do you want to search for partially specified names? Enter all of them on one line, seperated by spaces. Domain Names: hlo.foo.bar Enter the IP addresses of your nameservers Enter a blank IP address to stop. Nameserver IP Address: 192.168.0.2 Nameserver IP Address: 192.168.0.3 Nameserver IP Address:
Copying /etc/resolv.conf to /etc/resolv.conf.real... Creating link from /etc/resolv.conf.real to /etc/resolv.conf 1.) List CHAP secrets 2.) Add a New CHAP secret 3.) Delete a CHAP secret 4.) List PPTP Tunnels 5.) Add a NEW PPTP Tunnel 6.) Delete a PPTP Tunnel 7.) Configure resolv.conf 8.) Select a default tunnel 9.) Quit ?: 8 1.) my_work_tunnel 2.) cancel Which tunnel do you want to be the default?: 1 1.) List CHAP secrets 2.) Add a New CHAP secret 3.) Delete a CHAP secret 4.) List PPTP Tunnels 5.) Add a NEW PPTP Tunnel 6.) Delete a PPTP Tunnel 7.) Configure resolv.conf 8.) Select a default tunnel 9.) Quit ?: 9
Note that you must be running with root privileges to start PPTP.
You start PPTP with pptp-command by running the script and choosing 1:
[your_sys pptp]# pptp-command 1.) start 2.) stop 3.) setup 4.) quit What task would you like to do?: 1 1.) my_work_tunnel Start a tunnel to which server?: 1 Tunnel my_work_tunnel is active on ppp0. IP Address: 173.17.217.32 Route: add -net 16.0.0.0/8 ppp0 added All routes added. Installed /etc/resolv.conf.pptp as /etc/resolv.conf
You should always stop PPTP when you are done with the tunnel because pptp-command then correctly restores the link to your file resolv.conf. To stop PPTP:
[your_sys pptp]# pptp-command stop
Issuing PPTP Commands from the Shell Prompt
You can issue PPTP commands directly from the shell prompt (without displaying the command list) by running the script followed by any of the following commands:
For example, the following command stops PPTP when you are done with the tunnel:
[your_sys pptp]# pptp-command stop
If you get stuck and want help, contact the Compaq Open Source support site and post your questions.
Contact Us!
After you get PPTP working, please log into the Compaq Open Source support site and post what kind of system you are using, and so forth. This information is very valuable to us and others who are using PPTP and everyone appreciates it.
Acknowledgements
The following people are mainly responsible for making this all work:
Vasudevan Arasanipalai Brian Fisk Doug Larrick Robert Muth Jack Perveiler Kenneth Schalk Alan Sherlock Peter Soderquist Scott Venier Jeff Wiedemeier Written by Charlie GreenmanMaintained by James Cameron