Posts Tagged ‘myvpn’

CentOS6.0配置VPN客户端

星期六, 十二月 10th, 2011

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的文件安装.