Many referencesArticleFinally, the PPTP service is successfully installed in Ubuntu 9.04 of vpslink, and the iPad is successfully logged on to the Internet. Change to the following steps:
1. Modify sources. List.
Because vpslink does not maintain pai.vpslink.com, we need to define some public mirror.
First, run the following command:
# Sed-I's/mirror.vpslink.com/mirrors.rit.edu/g'/etc/APT/sources. List
Then, replace the/etc/APT/sources. list file with the following content:
Deb http: // Mirrors.163.com/ubuntu/ karmic main restricted universe multiverse
Deb http: // Mirrors.163.com/ubuntu/ karmic-security main restricted universe multiverse
Deb http: // Mirrors.163.com/ubuntu/ karmic-Updates main restricted universe multiverse
Deb http: // Mirrors.163.com/ubuntu/ karmic-proposed main restricted universe multiverse
Deb http: // Mirrors.163.com/ubuntu/ karmic-backports main restricted universe multiverse
Deb - SRC http: // Mirrors.163.com/ubuntu/ karmic main restricted universe multiverse
Deb - SRC http: // Mirrors.163.com/ubuntu/ karmic-security main restricted universe multiverse
Deb - SRC http: // Mirrors.163.com/ubuntu/ karmic-Updates main restricted universe multiverse
Deb - SRC http: // Mirrors.163.com/ubuntu/ karmic-proposed main restricted universe multiverse
Deb - SRC http: // Mirrors.163.com/ubuntu/ karmic-backports main restricted universe multiverse
Please refer to the following link for more information: sources.
2. Install the PPTP service.
# Apt-Get update
# Apt-Get install pptpd
3. edit/etc/pptpd. conf.
# Cancel the comments of the two lines (used to assign to connected VPN users ):
Localip 192.168.0.1
Remoteip 192.168.0.234-238,192.168 .0.245
# Comment out the following line (if there is a problem in 9.0.4, It is not needed ):
Logwtmp
4. Add VPN login users.
Edit/etc/PPP/chap-secrets to add a record
Username pptpd password *
# Username indicates the Login User Name
# Password indicates the user's password
# Pptpd indicates the pptpd service name. Do not modify it here.
# * Indicates that the login user can connect to any location
5. Set DNS resolution.
Edit/etc/PPP/pptpd-options, find the "MS-DNS" project, and change it to the opendns address as follows:
MS-DNS 208.67.222.222
MS-DNS 208.67.220.220
6. Configure/etc/sysctl. conf to allow forwarding.
First, find the net. ipv4.ip _ forward entry and modify it:
Net. ipv4.ip _ forward = 1
Then, run the following command:
# Sysctl-P
7. Restart the pptpd service.
#/Etc/init. d/pptpd restart
8. Configure iptables.
#/Sbin/iptables-T Nat-A postrouting-s 192.168.0.0/24-O eth0-J Masquerade
9. Save and configure iptables after restart.
# Iptables-save>/etc/iptables-Rules
Modify/etc/Network/interfaces and add the following in eth0:
Pre-up iptables-Restore </etc/iptables-Rules
Note that the Nash-hotplug is cleared; otherwise, the CPU is always occupied by 97%.
Modify the/etc/rc. Local file and add this command before exit 0: pkill-9 Nash