Article Title: How to Use ADSL to access the Internet in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Software and hardware environment:
Redhat in Linux 6.2
Alcatel ADSL modem A1000
Shanghai Telecom
1. Download pptp client
Linux/pptp/pptp-linux-1.0.2-patched.tar.gz "> ftp://ftp.rhapsodyk.net/pub/linux/pptp/pptp-linux-1.0.2-patched.tar.gz
This file has been specially patched for Alcatel A1000.
2. download the latest pppd package
Ftp://cs.anu.edu.au/pub/software/ppp
The RPM version is better. I use 2.3.11.
You can use the latest PPPD package. You only need a file pppd in the/usr/sbin/directory, because it is used to compile pptp.
3. Make sure that pppd is in the/usr/sbin/directory, compile pptp, get the executable file pptp, and copy it to the/usr/bin directory.
4. Set/etc/ppp/pap-secrets as follows:
Username @ domain * password *
5. Set/etc/ppp/options as follows:
Lock
Debug
Name "username @ domain"
Remotename adsl
Defaultroute
6. Set/etc/hosts
10.0.0.138 adsl
7. Use the default settings. Your network adapter is 10.0.0.139/255.255.255.0. Do not set the default gateway so that the gateway will be automatically obtained after the ADSL dial-up.
8. Set DNS in/etc/resolv. conf to your ISP's DNS server. Here I am 202.96.199.20.
9. Run # pptp 10.0.0.138 in the command line to dial and obtain the ppp ip Address
You can open another window and use # tail-f/var/log/messages to monitor this process.
Sometimes the IP address cannot be obtained, which may be the reason for the line. Try multiple times.
10. You can monitor the line per minute in the cron job and use the following SHELL command
#! /Bin/sh
If! Ping-c 1 202.96.199.20.>/dev/null 2> amp; 1; then
/Usr/bin/killall pppd pptp
Pptp 10.0.0.138
Fi
11. You can install two NICs and the Squid Proxy Server to proxy the entire LAN to access the Internet. However, if you want to disguise the NIC, the kernel must be specially repaired.
VPN-HOWTO for Linux. You can enter vpn linux in www.google.com to find related pages.