Installing PPTP clients
Install Pptp-linux
Setting up Connection account information
sudo vim/etc/ppp/chap-secrets
Where $login_name is the login name, $password is the login password, $ip if the * is assigned to the server, you can specify it. $server _name is the alias for the service connection and needs to be consistent with the remotename in the actual configuration file
for authentication using chap# client server secret IP addresses$login_name $server _name $password $ip
To establish the connection profile connection, the file must be in the/etc/ppp/peers directory and can have multiple different connection profiles
sudo vim/etc/ppp/peers/connection
Configuration file connection content, $server _address to the actual connection server address, $login _name as the login user name, remotename the server name
" PPTP $server _address--nolaunchpppd " name $login _nameremotename $server _namerequire-mppe-file /etc/ppp/ Options.pptpipparam $connection
Setting up a PPTP gateway, creating a new configuration file
sudo nano/etc/ppp/ip-up.d/$connection
Type the following, where the network segment settings need to refer to the server settings
#!/bin/bashif"$PPP _ipparam""$connectin" then 192.168. 18.0/ dev $PPP _ifacefi
Set script permissions
sudo chmod +x/etc/ppp/ip-up.d/$connection
Ubuntu Server setting PPTP client connections