This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11792|Reply: 0

[VPN] CentOS 6 builds a VPN server

[Copy link]
Posted on 5/18/2015 11:41:13 PM | | |
CentOS 6 builds a VPN server

#安装yum源, and PPTPD services

rpm -Uvh http://poptop.sourceforge.net/yum/stable/rhel6/pptp-release-current.noarch.rpm

yum install -y ppp pptpd iptables

#编辑sysctl.conf file and open IP packet forwarding

vi /etc/sysctl.conf

net.ipv4.ip_forward = 1

#保存设置

/sbin/sysctl -p

#设置pptpd

vi /etc/ppp/options.pptpd

name vps

refuse-pap

refuse-chap

refuse-mschap

require-mschap-v2

require-mppe-128

proxyarp

nobsdcomp

novj

novjccomp

nologfd

ms-dns 4.2.2.1

ms-dns 4.2.2.2

#设置pptpd

vi /etc/pptpd.conf

option /etc/ppp/options.pptpd

debug

logwtmp

localip 10.10.10.1

remoteip 10.10.10.2-254

   www.ahlinux.com  

#设置iptables

iptables -t nat -F

iptables -t nat -A POSTROUTING -o eth0 -s 10.10.10.0/24 -j MASQUERADE

iptables -t nat -L -n

service iptables save

#添加到开机启动

chkconfig --level 345 pptpd on

#启动vpn server

/etc/init.d/pptpd start

#添加vpn用户名密码

vpnuser username passwd





Previous:Build a VPN server under CentOS 6.2
Next:VPN server configuration and application
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com