This article describes the procedures for configuring the PPTP client for commands.
A. Installing the PPTP client software
sudo apt-get install Pptp-linux
B. View network Configuration
[email protected]:~# ifconfigeth0 Link encap:ethernet HWaddr 00:0c:29:19:a7:0c inet addr:192.168.1.113 bcast:255.255.255.255 mask:255.255.255.0 inet6 addr:fe80::20c:29ff:fe19:a70c/64 scope:link up BROADC AST RUNNING multicast mtu:1500 metric:1 RX packets:255926 errors:0 dropped:0 overruns:0 frame:0 TX packets:28779 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:16821541 (16.8 MB) TX bytes:3126300 (3.1 MB) Lo Link encap:local Loopback inet addr:127.0.0.1 mask:255.0.0.0 Inet6 A DDR::: 1/128 scope:host up LOOPBACK RUNNING mtu:65536 metric:1 RX packets:1123 errors:0 dropped:0 over runs:0 frame:0 TX packets:1123 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:125046 (125.0 KB) TX bytes:125046 (125.0 kb) [email protected]:~# route-nkernel IP Routing Tabledestinatio N Gateway Genmask Flags Metric Ref use Iface0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
C. Initializing a VPN connection channel: Myvpn
sudo pptpsetup--create myvpn--server xxx.xxx.xxx.xxx--username xx1--password xx2--encrypt--startusing interface ppp0c Onnect:ppp0 <-->/dev/pts/3chap Authentication Succeededmppe 128-bit stateless compression enabledlocal IP Address 172.31.26.100remote IP Address 172.31.26.143
Successfully connected to a remote VPN server
[email protected]:~# IP addr show1:lo: <LOOPBACK,UP,LOWER_UP> MTU 65536 qdisc noqueue State UNKNOWN Group DEFA Ult link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo Valid_lft forever pre Ferred_lft Forever Inet6:: 1/128 scope host Valid_lft forever Preferred_lft Forever2:eth0: <broadcast,multica St,up,lower_up> MTU Qdisc pfifo_fast State up group default Qlen-Link/ether 00:0c:29:19:a7:0c BRD FF:FF:FF : Ff:ff:ff inet 192.168.1.113/24 BRD 255.255.255.255 scope global eth0 Valid_lft forever Preferred_lft Forever Inet6 fe80::20c:29ff:fe19:a70c/64 scope link Valid_lft forever preferred_lft forever10:ppp0: <pointopoint,multic Ast,noarp,up,lower_up> MTU 1496 Qdisc pfifo_fast State UNKNOWN Group default Qlen 3 link/ppp inet 172.31.26.100 p EER 172.31.26.143/32 Scope Global ppp0 valid_lft forever preferred_lft forever[email protected]:~# IP addr Show 1:lo: <loopback,up,lOwer_up> MTU 65536 qdisc noqueue State UNKNOWN Group default Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00 inet 127.0.0.1/8 Scope host lo valid_lft forever Preferred_lft Forever Inet6:: 1/128 Scope host Valid_lft Forever Preferred_lft Forever2:eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc pfifo_fast State up Group de Fault Qlen link/ether 00:0c:29:19:a7:0c brd ff:ff:ff:ff:ff:ff inet 192.168.1.113/24 BRD 255.255.255.255 Scope g Lobal eth0 Valid_lft Forever Preferred_lft forever inet6 fe80::20c:29ff:fe19:a70c/64 scope link Valid_lft f Orever preferred_lft forever10:ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> MTU 1496 Qdisc pfifo_fast State UNKNOWN Group default Qlen 3 link/ppp inet 172.31.26.100 peer 172.31.26.143/32 Scope Global Ppp0 valid_lft for Ever preferred_lft forever[email protected]:~# ping Www.google.comPING www.google.com (216.58.221.132) 56 (84) Bytes of data.64 bytes from Hkg07s02-in-f132.1e100.net (216.58.221.132): icmp_seq=1 ttl=53 time=310 ms64 bytes from hkg07s02-in-f132.1e100.net ( 216.58.221.132): icmp_seq=2 ttl=53 time=323 ms
D.1. Disconnecting the VPN connection
Poff Myvpn
2. Reconnect the VPN
Pon Myvpn
3. Read the configuration file to reconnect the VPN
sudo pppd call Myvpn Updetach
Ubuntu Configuration PPTP Client