在centos下安装pptp客户端:
1 yum install pptp ppp
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
chmod +x /usr/sbin/poff
2 pptpsetup --create my*** --server xx.xx.xx.xx --username xxxxx --password xxxxxxx --encrypt
创建*** 文件 在 /etc/ppp/peers
并且用户名密码写入到了这个文件/etc/ppp/chap-secrets
3 上线:
pon my***
下线:
poff my*** (全部下线poff -a)
4 然后ifconfig查看一下多了ppp0这个网络
现在还不能通过***来走
因为并不知道数据该怎么走,很明显要配一下路由
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.253 * 255.255.255.255 UH 0 0 0 ppp0
xx.xx.xx.xx 192.168.111.254 255.255.255.255 UGH 0 0 0 eth0
xx.xx.xx.xx 192.168.111.254 255.255.255.255 UGH 0 0 0 eth0
192.168.111.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 1002 0 0 eth0
default 192.168.111.254 0.0.0.0 UG 0 0 0 eth0
增加一条路由:
route add -net 192.168.1.0 netmask 255.255.255.0 dev ppp0
这样就能通过***来做事了。
本文介绍了在CentOS系统中安装PPTP客户端的步骤,包括使用yum安装pptp和ppp,设置启动和关闭脚本,通过pptpsetup创建连接,以及配置路由实现数据通过PPTP连接传输。
6654

被折叠的 条评论
为什么被折叠?



