If you want to access the Internet, you cannot do without a VPN. Linux has never had the so-called native support for VPN, so it is troublesome to establish a VPN connection. The following methods are successfully debugged on Ubuntu8.04 and PPTPVPN. This document describes how to connect to CUHKResNet. You can change the settings for other networks. 1. Install the pptp-linux package based on the system. Some related articles have pointed out that installing the VPNC plug-in can be inherited into NetworkManager (only applicable to Ubuntu ). Me
If you want to access the Internet, you cannot do without a VPN. Linux has never had the so-called native support for VPN, so it is troublesome to establish a VPN connection. The following methods are successfully debugged on Ubuntu 8.04 and pptp vpn. This document describes how to connect to CUHK ResNet. You can change the settings of other networks.
1. Install the VPN package
Install the pptp-linux package based on the system.
Some related articles have pointed out that installing the VPNC plug-in can be inherited into Network Manager (only applicable to Ubuntu ). I have not tried.
2. Set connection
Enter the terminal and enter:
Sudo pico/etc/ppp/peers/resnet
Insert the following content in the Editor:
Pty "pptp vpn.resnet.cuhk.edu.hk-nolaunchpppd"
File/etc/ppp/options.ppt p
Remotename PPTP
Persist
Defaultroute
Usepeerdns
Name s07xxxxx // enter the user name here
Press Ctrl + O, Enter, Ctrl + X to save and close.
3. Modify connection settings
Enter:
Sudo pico/etc/ppp/options.ppt p
The PPTP connection settings are displayed in the editor. Find
Require-mppe-128
Comment it out (that is, add the # in front of it #). Ctrl + O, Enter, Ctrl + X save and exit.
4. Set the user name and password
Enter:
Sudo pico/etc/ppp/pap-secrets
In the last line, enter
S07xxxxx PPTP Password
PPTP is in the middle, and there is a space between the user name and password. Ctrl + O, Enter, Ctrl + X save and exit.
So far, the setting is successful and the connection is ready.
Connection Method
Enter
Sudo pon resnet
Wait a few seconds to connect the VPN. Then enter
Ip route
Check whether dev/ppp0 has become the default value ). If no, enter:
Sudo ip route del default // Delete existing default
Sudo ip route add default dev ppp0 // add ppp0 as the default route
The VPN connection is ready.
You can simplify this process by writing scripts. For example:
Sudo pon resnet
Sleep 5
Sudo ip route del default
Sudo ip route add default dev ppp0
Save it as connect. sh and set the attribute to allow it to run. (From Nelson Is Here)