一、环境介绍
pptpd 经常用来穿墙,或者是进行机房服务器管理
1)Centos6.4 64bit minimal
二、服务安装
$ wget http://poptop.sourceforge.net/yum/stable/rhel6Server/pptp-release-current.noarch.rpm$ rpm -ivh pptp-release-current.noarch.rpm$ yum install pptpd ppp
三、配置
$ vi /etc/pptpd.confoption /etc/ppp/options.pptpdlocalip 172.16.7.1remoteip 172.16.7.30-100
$ vi /etc/ppp/options.pptpdname pptpdrefuse-paPRefuse-chaprefuse-mschaprequire-mschap-v2require-mppe-128proxyarplocknobsdcomp novjnovjccompnologfdms-dns 114.114.114.114ms-dns 114.114.115.115
$ vi /etc/ppp/chap-secrets# Secrets for authentication using CHAP# client server secret IP addressesdog pptpd pSc6Vgw55bb 172.16.7.31
四、启动
$ /etc/init.d/pptpd start$ vi /etc/sysctl.confnet.ipv4.ip_forward = 1$ sysctl -p#iptables 转发用来上外网$ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
五、检查
$ ps aux|grep pptpd$ netstat -ntlp|grep pptpd
六、客户端安装
$ yum install -y pptp ppp pptp-setup
#用pptpsetup做客户配置是个不错的工具,当然也可以自己手下配置#pptpsetup --create vpn-jiao --server x.x.x.x --username dog--passWord passwd --encrypt
#手动配置$ vi /etc/ppp/peers/vpn-testpty "pptp x.x.x.x --nolaunchpppd"locknoauthnobsdcompnodeflatename dogremotename vpn-testipparam vpn-testrequire-mppe-128#手动配置密码$ vi /etc/ppp/chap-secrets# Secrets for authentication using CHAP# client server secret IP addressesdog vpn-test "pSc6Vgw55bb" *
#运行手动拨号$ pppd call vpn-test updetach
#检查$ ps aux|grep pptp
新闻热点
疑难解答