文章来源https://www.aikaiyuan.com/7221.html
centos 7 命令行下可使用pptpsetup进行pptp拨号,首先安装ppp,pptp和pptp-setup三个包,使用pptpsetup进行连接。
# yum install ppp pptp pptp-setup -y
1. pptpsetup --createVPN名字 --server VPNip --username username --password password --encrypt --start
2. # pptpsetup --create vpn --server xxxx --username xxxx --password xxxx --encrypt --start
3. Connect: ppp0 <--> /dev/pts/1
4. CHAP authentication succeeded
5. MPPE 128-bit stateless compression enabled
6. local IP address 192.168.160.13
7. remote IP address 192.168.160.10
使用ifconfig命令,可以看到会多了一个ppp0网口
1. # ifconfig
2. ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1396
3. inet 192.168.160.13 netmask 255.255.255.255 destination 192.168.160.10
4. ppp txqueuelen 3 (Point-to-Point Protocol)
5. RX packets 18 bytes 792 (792.0 B)
6. RX errors 0 dropped 0 overruns 0 frame 0
7. TX packets 9 bytes 90 (90.0 B)
8. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
# route add default dev ppp0
# ping xx.xx.xx.xx
# pkill pptp
1. # pptpsetup --create vpn --server xxxx --username xxxx --password xxxx --encrypt --start
2. Using interface ppp0
3. Connect: ppp0 <--> /dev/pts/1
4. EAP: unknown authentication type 26; Naking
5. EAP: peer reports authentication failure
6. Connection terminated.
解决方法:
1. # vim /etc/ppp/options
2. refuse-pap
3. refuse-eap
4. refuse-chap
5. refuse-mschap
6. require-mppe
转载于:https://www.cnblogs.com/ebay/p/9968090.html