参考资料:http://www.dabu.info/centos6-4-structures-pptp-vpn.htmlhttp://www.ttlsa.com/linux/centos-install-pptp-vpn/
以下在centos 6.4 64位下安装通过 最重要的一点,要对根据ppp版本选择对应的pptpd版本,下面是最常用的对应关系 ppp 2.4.4——————>pptpd 1.3.4ppp 2.4.5——————>pptpd 1.4.0 下载地址wget http://poptop.sourceforge.net/yum/stable/packages/ppp-2.4.5-33.0.rhel6.x86_64.rpmwget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.4.0-1.el6.x86_64.rpm rpm -ivh ppp-2.4.5-33.0.rhel6.x86_64.rpmrpm -ivh pptpd-1.4.0-1.el6.x86_64.rpm vi /etc/pptpd.conf,末尾添加localip 192.168.9.1remoteip 192.168.9.11-30 vi /etc/ppp/options.pptpd,修改DNS如下ms-dns 8.8.8.8ms-dns 8.8.4.4 vi /etc/ppp/chap-secrets,配置用户名密码格式:用户名 pptpd 密码 *user1 pptpd 123456 *user2 pptpd 123456 * vi /etc/sysctl.conf net.ipv4.ip_forward = 1使配置立即生效:/sbin/sysctl -p //这一步是可选的启用日志 vi /etc/syslog.conf追加一行:daemon.debug /var/log/pptpd.log 配置iptables 执行命令:/sbin/iptables -t nat -A POSTROUTING -o eth0 -s 192.168.9.0/24 -j MASQUERADE /etc/init.d/iptables save 防火墙最终配置如下:# Generated by iptables-save v1.4.7 on Tue Sep 1 05:06:44 2015*nat:PREROUTING ACCEPT [0:0]:POSTROUTING ACCEPT [1:124]:OUTPUT ACCEPT [1:124]-A POSTROUTING -s 192.168.9.0/24 -o eth0 -j MASQUERADE COMMIT*filter:INPUT DROP [0:0]:FORWARD ACCEPT [0:0]:OUTPUT ACCEPT [0:0]-A INPUT -p icmp -j DROP-A INPUT -p tcp -m tcp --dport 1723 -j ACCEPT //pptd端口-A INPUT -p tcp -m tcp --dport 2211 -j ACCEPT //ss5端口-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT //ssh端口-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT COMMIT# Completed on Tue Sep 1 05:06:44 2015 相关文档http://blog.163.com/f_jinyi/blog/static/3118031520101126104227334/http://www.linuxidc.com/Linux/2013-09/89667p2.htmhttp://www.it165.net/os/html/201304/5052.htmlhttp://guojiping.blog.51cto.com/5635432/1317367http://my.oschina.net/lionel45/blog/179164http://my.oschina.net/praise/blog/135260
时间: 2024-10-25 16:24:49