CentOS6.0配置VPN客户端

2011年12月10日

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 myvpn “password” *
——————————————

vi /etc/ppp/peers/myvpn
——————————————
# written by pptpsetup
pty “pptp serverIP –nolaunchpppd”
lock
#noauth
nobsdcomp
nodeflate
name username
remotename myvpn
ipparam myvpn
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.拨vpn
pon myvpn

5.查看是否连接
ifconfig
#############################################################################
ppp0 Link encapoint-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 myvpn
还有一个简单的方法,使用Centos源的添加删除软件进行安装相关的软件.
安装两个文件,ppp,pptp,然后搜索vpn,找标题里有vpn的文件安装.


sicnature ---------------------------------------------------------------------
I P 地 址: 18.223.172.252
区 域 位 置: 美国俄亥俄
系 统 信 息: 美国
Original content, please indicate the source:
同福客栈论坛 | 蟒蛇科普海南乡情论坛 | JiaYu Blog
sicnature ---------------------------------------------------------------------
Welcome to reprint. Please indicate the source http://www.myzhenai.com.cn/post/504.html

没有评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注