centos pptp客户端 连接服务端


文章来源https://www.aikaiyuan.com/7221.html

 

centos 7 命令行下可使用pptpsetup进行pptp拨号,首先安装ppp,pptp和pptp-setup三个包,使用pptpsetup进行连接。

1. 安装ppp,pptp,pptp-setup

# yum install ppp pptp pptp-setup -y

2. 使用pptpsetup进行连接

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

3. 查看是否创建成功

使用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

4. 添加默认路由

# route add default dev ppp0

5. 测试是否连上服务端

# ping xx.xx.xx.xx

6. 断开连接

# pkill pptp

7. 遇到的问题

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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM