安装pptp软件,如果没有安装包请安装epel源:[root@lw-01 ~]# yum install pptp
更改配置:
1、更改拨号用户信息文件[root@lw-01 ~]# vi /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
####### redhat-config-network will overwrite this part!!! (begin) ##########
####### redhat-config-network will overwrite this part!!! (end) ############
username connect*** "password" *
#注意:增加了zhangsan pptp "password" *
#其中username为×××账户名,"password"为×××账户密码
#connect***为×××标识,用户区分不同的×××连接。
2、创建拨号配置文件connect***(上述的×××标识)[root@lw-01 ~]# vi /etc/ppp/peers/pptp
pty "pptp 124.248.**.** --nolaunchpppd"
noauth
refuse-eap
require-mppe-128
name bengu
remotename pptp
file /etc/ppp/options.pptp
#其中 124.248.**.** 为×××服务器IP,name字段后跟的是/etc/ppp/chap-secrets中的username(×××账户名),
#remotename为×××标识,其他保持默认
3、启动×××客户端
root执行如下命令[root@lw-01 ~]#pppd call pptp
4、检查拨号结果,稍等10秒左右后,执行
如下命令检查:[root@lw-01 ~]# ps -ef|grep pppd
root 3617 1 0 06:40 ? 00:00:00 pppd call connect***
root 3618 3617 0 06:40 ? 00:00:00 pptp 166.123.10.210 --nolaunchpppd
root 3625 1 0 06:40 ? 00:00:00 pptp 166.123.10.210 --nolaunchpppd
root 3692 3514 0 06:58 pts/3 00:00:00 grep pppd
5、检查获取的***客户端IP[root@lw-01 ~]# ifconfig
ppp0 Link encap:Point-to-Point Protocol
inet addr:172.16.8.201 P-t-P:172.16.8.214 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1396 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:248 (248.0 b) TX bytes:80 (80.0 b)
其中172.16.8.201为***客户端网卡ppp0的IP地址。
配置完成
6、如果ping不通***server局域网,请增加路由:[root@lw-01 ~]# route add -net 172.16.8.0/24 gw 172.16.8.214