1.安装包
yum -y install ppp
yum -y install pptp
2.配置文件
vi /etc/ppp/chap-secrets
------------------------------------------
# Secrets for authentication using CHAP
# client server secret IP addresses
username my*** "password" *
------------------------------------------
vi /etc/ppp/peers/my***
------------------------------------------
# written by pptpsetup
pty "pptp serverIP --nolaunchpppd"
lock
#noauth
nobsdcomp
nodeflate
name username
remotename my***
ipparam my***
require-mppe-128
refuse-pap
refuse-chap
refuse-eap
refuse-mschap
------------------------------------------
3.复制命令
cp /usr/share/doc/ppp-2.4.4/scripts/pon /usr/sbin/
cp /usr/share/doc/ppp-2.4.4/scripts/poff /usr/sbin/
chmod +x /usr/sbin/pon /usr/sbin/poff
4.拨***
pon my***
5.查看是否连接
ifconfig
#############################################################################
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.21.203 P-t-P:192.168.21.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1496 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:60 (60.0 b) TX bytes:66 (66.0 b)
#############################################################################
6.断开连接
poff my***
yum -y install pptp
2.配置文件
vi /etc/ppp/chap-secrets
------------------------------------------
# Secrets for authentication using CHAP
# client server secret IP addresses
username my*** "password" *
------------------------------------------
vi /etc/ppp/peers/my***
------------------------------------------
# written by pptpsetup
pty "pptp serverIP --nolaunchpppd"
lock
#noauth
nobsdcomp
nodeflate
name username
remotename my***
ipparam my***
require-mppe-128
refuse-pap
refuse-chap
refuse-eap
refuse-mschap
------------------------------------------
3.复制命令
cp /usr/share/doc/ppp-2.4.4/scripts/pon /usr/sbin/
cp /usr/share/doc/ppp-2.4.4/scripts/poff /usr/sbin/
chmod +x /usr/sbin/pon /usr/sbin/poff
4.拨***
pon my***
5.查看是否连接
ifconfig
#############################################################################
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.21.203 P-t-P:192.168.21.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1496 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:60 (60.0 b) TX bytes:66 (66.0 b)
#############################################################################
6.断开连接
poff my***
转载于:https://blog.51cto.com/wjpinrain/836476