参考教程:http://blog.secaserver.com/2011/10/install-vpn-pptp-server-centos-6/
1. Install ppp via yum:
2. Download and install pptpd (the daemon for point-to-point tunneling). You can find the correct package at this website http://poptop.sourceforge.net/yum/stable/packages/ :
$ cd /usr/local/src
$ wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.el6.x86_64.rpm
$ rpm -Uhv pptpd-1.3.4-2.el6.x86_64.rpm
|
3. Once installed, open /etc/pptpd.conf using text editor and add following line:
localip 209.85.227.26
remoteip 209.85.227.27-30
|
4. Open /etc/ppp/options.pptpd and add authenticate method, encryption and DNS resolver value:
require-mschap-v2
require-mppe-128
ms-dns 8.8.8.8
|
5. Lets create user to access the VPN server. Open /etc/ppp/chap-secrets and add the user as below:
The format is: [username] [space] [server] [space] [password] [space][IP addresses]
6. We need to allow IP packet forwarding for this server. Open /etc/sysctl.conf via text editor and change line below:
7. Run following command to take effect on the changes:
8. Allow IP masquerading in IPtables by executing following line:
$ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
$ service iptables save
$ service iptables restart
|
Update: Once you have done with step 8, check the rules at /etc/sysconfig/iptables. Make sure that the POSTROUTING rules is above any REJECT rules.
9. Turn on the pptpd service at startup and reboot the server:
用户密码:/etc/ppp/chap-secrets
iptables -t nat -A POSTROUTING -s 192.168.30.0/24 -j SNAT --to-source 192.168.10.11(内网ip)
如果是内网机器,还要把默认的1723端口做个端口转发。
最后,windows系统上新建vpn连接,一切就OK。
分享到:
相关推荐
CentOS 6 PPTPD一键安装程序。 改名为pptp.sh,权限改x,再运行即可。
centos7安装部署gitlab服务器,1. 安装依赖软件2.设置postfix开机自启,并启动,postfix支持gitlab发信功能3.下载gitlab安装包,然后安装4.配置GITLAB
CentOS7安装Git
此内容是本人整理的针对服务器的系统安装详细图文安装步骤。 对centos7.6的安装步骤进行逐步的拆解,标注。
CentOS 6.xNTP时间服务器详细配置,CentOS 6.xNTP时间服务器详细配置
CentOS下安装NTP时间服务器
Centos7.9安装部署Zabbix6,需要安装包的发邮箱,文件里面包含邮箱地址
CentOS是Linux发行版之一,相信不少朋友想知道CentOS系统安装配置的方法,下面小编给大家介绍下安装配置CentOS6.6的具体步骤,感兴趣的朋友不妨来了解下吧。
centos7离线安装http服务器的rpm包
在centos6中搭建FTP服务器,从而实现文件的上传和下载
CentOS 6.2安装配置LAMP服务器
centos 7.9服务器 离线 搭建svn服务器 ,该文章适用于 开发人员 实施人员 项目经理用于项目文档管理 代码管理,而不指定如何在centos7.9环境下离线搭建svn服务器,因为大多数的网站只是介绍yum install 的方式,但是...
centos 下安装svn服务器
centos6.7安装jdk1.8全部详细过程,若有疑问,欢迎联系!
centos7.0安装mysql centos7.0安装mysql centos7.0安装mysql
centos6离线rpm安装unzip和zip zip-3.0-1.el6_7.1.x86_64.rpm unzip-6.0-5.el6.x86_64.rpm 解决Red Hat 6.9系统No more mirrors to try问题; 1.查看 unzip 是否被安装 rpm -qa | grep unzip 2.先安装unzip: rpm ...
centos6.5安装LNMP服务器教程
解决DELL服务器安装centos系统安装出现屏幕倾斜或超出屏幕显示范围的处理方法
Centos8 安装 Caddy Web服务器.doc
CentOS 6.4安装配置LAMP服务器