CentOS系统一键搭建PPTP 方法

Publish: June 25, 2013 Category: 文档 No Comments

第一步: 下载vpn(CentOS6专用)一键安装包

#wget http://www.hi-vps.com/shell/vpn_centos6.sh #chmod a+x vpn_centos6.sh

第二步: 运行一键安装包

#bash vpn_centos6.sh
1. 安装VPN服务
2. 修复VPN
3. 添加VPN用户

如果VPN拨号发生错误,可以试着修复VPN,然后重启VPS

#bash vpn_centos6.sh

选择2,然后reboot

这个好像需要更改iptables设置/etc/sysconfig/iptables编辑,或者直接ssh输入:

iptables -t nat -A POSTROUTING -s 172.16.36.0/24 -j SNAT --to-source 主机外网ipservice iptables save #保存上面设置的规则service iptables restart

常用命令:

service iptables sava #保存规则
service iptables start #启动iptables
service iptables stop #停止iptables
service iptables restart #重启iptables
service pptpd start #启动pptp
service pptpd stop #停止pptp
service pptpd restart #重启pptp
service pptpd restart-kill #重启pptp, 并且断开所有已经连接的用户
service pptpd status #查看pptp目前状态
chkconfig pptpd on #设置自动启动
chkconfig iptables on #设置自动启动

请为这篇文章评分:
( 已有 1 人评分, 平均得分: 5 分 )

Tags: linux, CentOS

Related Posts:

评论已关闭