Use pptpclient to connect to a remote VPN Server In debian
Source: Internet
Author: User
In debian, use pptpclient to connect to the remote VPN Server-Linux Enterprise Application-Linux server application information. The following is a detailed description. 1. Run the following command to install the pptp client software:
# Apt-get install pptp-linux
Sometimes we enable the SSH connection in character Terminal Mode for remote maintenance. In this case, we need to use the pon and poff programs. Pon is used for VPN dialing, and poff is used to disconnect the VPN connection. To use these two programs properly, you must configure a VPN connection according to the preceding configuration method. Suppose we have established a VPN connection named remote, you can use the following command to connect to the VPN Server.
Debian :~ # Pon remote # create a VPN connection
Debian :~ # Plog # view VPN connection status
Debian :~ # Poff remote # disconnect a VPN connection
Remote VPN connection information is stored in two files:/etc/ppp/chap-secrets and/etc/ppp/peers/remote.
2. Example of the/etc/ppp/chap-secrets file:
# Secrets for authentication using CHAP
# Client server secret IP addresses
Username PPTP userpass *
3. Example of the/etc/ppp/peers/remote file:
# This line is the Program executed during pptp dialing. 10.0.0.100 is the address of the pptp server.
Pty "pptp 0.0.0.0? Nolaunchpppd"
# Name indicates the user name on the PPTP Server
Name username
# Remotename indicates the service name in the chap-secrets File
Remotename PPTP
Require-mppe-128
File/etc/ppp/options.ppt p
Ipparam vpn
# Defaultroute indicates using the newly created ppp connection as the default route
Defaultroute
# Replacedefaultroute indicates that the original default route is replaced when a new connection is used as the default route.
Replacedefaultroute
5. Use real username and password to replace the two items in the configuration file.
6. Add a ppp dial-up connection to the interfaces File
Add the following content to/etc/network/interfaces:
Iface vpn inet ppp
Provider remote
After adding the vpn, you can use ifup vpn to start the pptp virtual private network.
7. Add a route for the local LAN
This step does not have much to do with the virtual private network, but it is written here as needed. Modify the/etc/network/interfaces file and add the following to the LAN configuration of the original eth0:
Up route add-net 10.0.0.0 netmask route 0.0.0 eth0
In this way, although a route entry is added when pptp is not used, the system will not be affected. After pptp is enabled, no route error occurs.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service