Centos6.2 VPN dialing
Because the newly installed server is inaccessible to the outside world within the internal network, you need to first dial out the external VPN for development and use. Now, record the process of establishing VPN dialing on CENTOS6.2.
1. to install the required package, you need to install the ppp and pptp packages. install the software in the Centos system and change it to a zombie. Run the following command:
# Yum install ppp
# Yum install pptp
2. Create a new connection and run the pptpsetup command to create a connection named vpn1:
# Pptpsetup -- create vpn1 -- server 211. x -- username test -- password test
3. Connection: # pppd call vpn1
4. view the connection # ifconfig/all
5. Disconnect: # killall pppd
6. Add a route, and dial up. If no route is added, the new IP address will not work, the simplest way is to throw all inbound and outbound access requests to the new network device ppp0 created by the pptpsetup command (note that the newly created connection name is vpn1, however, the name of the newly created network device will be ppp0). The command is as follows: (Note: After adding a route, the existing network link may fail)
# Route add-net 0.0.0.0 dev ppp0
7. If necessary, add the dialing work to the self-launch, edit the/etc/rc. d/rc. local file, and add the following command:
# Vi/etc/rc. d/rc. local
Pppd call vpn1
Route add-net 0.0.0.0 dev ppp0
OK !! The configuration is complete. In the future, you can directly access the address assigned by the vpn Server. You can configure the ppptd server to assign a fixed IP address to the VPN user.