centos6.3下安装pptpd vpn

分类:CentOS教程 阅读:13082 次

centos 6 yum pptpd安装配置

1.环境
centos6.3 64bit

2.安装pptpd
wget http://poptop.sourceforge.net/yum/stable/pptp-release-current.noarch.rpm
rpm -ivh pptp-release-current.noarch.rpm
yum install pptpd

3.配置pptpd
vi /etc/pptpd.conf
localip 10.10.0.1
remoteip 10.10.0.101-200

#配置DNS
vi /etc/ppp/options.pptpd
ms-dns 8.8.8.8

#添加用户gaojinbo
vi /etc/ppp/chap-secrets
gaojinbo pptpd gaojinbo.com 10.10.0.102

4,开启NAT转发
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1

sysctl -p
iptables -t nat -A POSTROUTING -j MASQUERADE