( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKBase.class.php on line 114
Call Stack
#TimeMemoryFunctionLocation
10.0015413648{main}( ).../index.php:0
20.12094264096Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.592115890320Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.592315890376Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.592315890752Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.592315890752Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.592515890848Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.593415929088require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.597716221032GKTemplate->__construct( ).../component.php:31
100.611516374912GKTemplateMenu->getMenuType( ).../gk.framework.php:84
110.612216418880require_once( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKMenu.php' ).../helper.menu.php:19

( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKHandheld.php on line 76
Call Stack
#TimeMemoryFunctionLocation
10.0015413648{main}( ).../index.php:0
20.12094264096Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.592115890320Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.592315890376Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.592315890752Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.592315890752Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.592515890848Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.593415929088require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.597716221032GKTemplate->__construct( ).../component.php:31
100.614016542128GKTemplateMenu->getMenuType( ).../gk.framework.php:85
centos 5.5 pptpd install
Logo
Print this page

centos 5.5 pptpd install

http://space.itpub.net/665930/viewspace-682794

 

9、设置开机自动运行服务。我们最后一步是将pptp和iptables设置为开机自动运行,这样就不需要每次重启服务器后手动启动服务了。当然你不需要自动启动服务的话可以忽略这一步。输入指令:

#chkconfig pptpd on

 

PPTP 全称为 Point to Point Tunneling Protocol — 点到点隧道协议,是VPN协议中的一种。

安装相关软件

  1. yum install -y ppp iptables
  2. wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.i386.rpm
  3. rpm -ivh pptpd-1.3.4-1.rhel5.1.i386.rpm

配置文件/etc/ppp/options.

  1. mv /etc/ppp/options.pptpd /etc/ppp/options.pptpd.bak
  2. vi /etc/ppp/options.pptpd

输入以下内容:

  1. #相当于身份验证时的域,一定要和/etc/ppp/chap-secrets中的内容对应
  2. name pptpd
  3. #传输加密。ppp-2.4.2以上的版本只支持MPPE加密,内核模块为 ppp_mppe.o
  4. #拒绝pap,chap身份验证
  5. refuse-pap
  6. refuse-chap
  7. #拒绝mschap身份验证
  8. refuse-mschap
  9. #采用mschap-v2(Microsoft Challenge Handshake Authentication Protocol, Version 2)身份验证方式
  10. require-mschap-v2
  11. #在采用mschap-v2身份验证方式时要使用MPPE进行加密
  12. require-mppe-128
  13. #启动ARP代理
  14. proxyarp
  15. lock
  16. nobsdcomp
  17. novj
  18. novjccomp
  19. nologfd
  20. #分配给客户的DNS,这里用的是opendns
  21. ms-dns 208.67.222.222
  22. ms-dns 208.67.220.220

配置文件/etc/ppp/chap-secrets

  1. mv /etc/ppp/chap-secrets /etc/ppp/chap-secrets.bak
  2. vi /etc/ppp/chap-secrets

输入以下内容

  1. # Secrets for authentication using CHAP
  2. # client        server  secret                  IP addresses
  3. vi                pptpd  viyin.net                   *

用户名vi,密码viyin.net ,*表示任意ip
pptpd要和/etc/ppp/options.pptpd中的name 部分的pptpd匹配

配置文件/etc/pptpd.conf

  1. mv /etc/pptpd.conf /etc/pptpd.conf.bak
  2. vi /etc/pptpd.conf

输入以下内容:

  1. option /etc/ppp/options.pptpd
  2. logwtmp
  3. localip 10.100.1.1
  4. remoteip 10.100.1.20-50

为拨入VPN的用户动态分配IP

打开防火墙端口
1723端口和47端口打开,打开GRE协议

  1. /sbin/iptables -A INPUT -p tcp --dport 1723 -j ACCEPT
  2. /sbin/iptables -A INPUT -p tcp --dport 47 -j ACCEPT
  3. /sbin/iptables -A INPUT -p gre -j ACCEPT
  4. /sbin/iptables  -A POSTROUTING -t nat -s 10.100.1.0/24 -o seth0 -j MASQUERADE

配置文件/etc/sysctl.conf

vi /etc/sysctl.conf
修改以下内容:

net.ipv4.ip_forward = 1
开启NAT转发功能

保存、退出后执行:

/sbin/sysctl -p

启动PPTP VPN 服务器端:

/sbin/service pptpd start

检查PPP是否支持MPPE,用以下命令检查PPP是否支持MPPE:

strings ‘/usr/sbin/pppd’ |grep -i mppe | wc –lines

果以上命令输出为“0”则表示不支持;输出为“30”或更大的数字就表示支持。

注意:

如果一直提示619或者800错误,查看日志

Last modified onSunday, 14 October 2012 04:07

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0015413648{main}( ).../index.php:0
20.12094264096Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.12094264096Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.381111454992Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.382111479272Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.383311534600Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.384111562000require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.396111961632K2ControllerItem->execute( ).../k2.php:64
90.396111961632K2ControllerItem->display( ).../BaseController.php:710
100.409712612336K2ControllerItem->display( ).../item.php:78
110.409712612336K2ControllerItem->display( ).../controller.php:19
120.415712983376Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.418113003744K2ViewItem->display( ).../ViewController.php:102
140.577215869024K2ViewItem->display( ).../view.html.php:742
150.577215869024K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.583216041960include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
  • Published in VPN
  • Read 2051 times

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0015413648{main}( ).../index.php:0
20.12094264096Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.12094264096Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.381111454992Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.382111479272Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.383311534600Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.384111562000require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.396111961632K2ControllerItem->execute( ).../k2.php:64
90.396111961632K2ControllerItem->display( ).../BaseController.php:710
100.409712612336K2ControllerItem->display( ).../item.php:78
110.409712612336K2ControllerItem->display( ).../controller.php:19
120.415712983376Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.418113003744K2ViewItem->display( ).../ViewController.php:102
140.577215869024K2ViewItem->display( ).../view.html.php:742
150.577215869024K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.583216041960include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
Template Design © Joomla Templates | GavickPro. All rights reserved.