( ! ) 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.0010413920{main}( ).../index.php:0
20.11824264560Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.397513129928Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.397713129872Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.397713130248Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.397713130248Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.397913130344Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.398313168584require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.403713460944GKTemplate->__construct( ).../component.php:31
100.409413602464GKTemplateMenu->getMenuType( ).../gk.framework.php:84
110.410013646432require_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.0010413920{main}( ).../index.php:0
20.11824264560Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.397513129928Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.397713129872Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.397713130248Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.397713130248Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.397913130344Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.398313168584require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.403713460944GKTemplate->__construct( ).../component.php:31
100.411713769296GKTemplateMenu->getMenuType( ).../gk.framework.php:85
CentOS 安装和配置PPTP VPN
Logo
Print this page

CentOS 安装和配置PPTP VPN

PPTP 全称为 Point to Point Tunneling Protocol — 点到点隧道协议,是VPN协议中的一种。 虚拟专用网(VPN)被定义为通过一个公用网络(通常是因特网)建立一个临时的、安全的连接,是一条穿过混乱的公用网络的安全、稳定的隧道。虚拟专 用网是对企业内部网的扩展。虚拟专用网可以帮助远程用户、公司分支机构、商业伙伴及供应商同公司的内部网建立可信的安全连接,并保证数据的安全传输。虚拟 专用网可用于不断增长的移动用户的全球因特网接入,以实现安全连接;可用于实现企业网站之间安全通信的虚拟专用线路,用于经济有效地连接到商业伙伴和用户 的安全外联网虚拟专用网。

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

虚拟专用网(VPN)被定义为通过一个公用网络(通常是因特网)建立一个临时的、安全的连接,是一条穿过混乱的公用网络的安全、稳定的隧道。虚拟专 用网是对企业内部网的扩展。虚拟专用网可以帮助远程用户、公司分支机构、商业伙伴及供应商同公司的内部网建立可信的安全连接,并保证数据的安全传输。虚拟 专用网可用于不断增长的移动用户的全球因特网接入,以实现安全连接;可用于实现企业网站之间安全通信的虚拟专用线路,用于经济有效地连接到商业伙伴和用户 的安全外联网虚拟专用网。


CentOS-5 下配置PPTP VPN,安装PPTP需要ppp和iptables这两个软件支持

安装相关软件 32位版:

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

64位版:

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

接下来开始配置文件:

vi /etc/ppp/options.pptpd

输入以下内容:

name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 8.8.8.8
ms-dns 8.8.4.4

编辑完保存并退出!接着

vi /etc/pptpd.conf

输入以下内容:

option /etc/ppp/options.pptpd
logwtmp
localip 192.168.10.1
remoteip 192.168.10.2-40

后两行是vpn的ip地址分配,不能和本地的冲突。编辑完保存并退出!

vi /etc/ppp/chap-secrets

输入以下内容:

username1 pptpd password1 *
username2 pptpd password2 *
username3 pptpd password3 *

对就的用户名和密码,你可以更改!保存并退出!

vi /etc/sysctl.conf

找到:

net.ipv4.ip_forward = 0

更改为:

net.ipv4.ip_forward = 1

保存并退出!再执行sysctl -p命令!
此时PPTPD配置完成! 现在开始启动,输入:

service pptpd start

配置iptables,首先输入

service iptables start

启动,使用命令:

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

完成后:

/etc/init.d/iptables save

保存,并且输入

/etc/init.d/iptables restart

重新启动。

配置完成,如果你需要服务器启动时候自动启动VPN服务,还需要输入

chkconfig pptpd on
chkconfig iptables on

到此为止,PPTP VPN就已配置完成。

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.0017414672{main}( ).../index.php:0
20.09774265312Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.09774265312Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.329911456504Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.331011480880Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.332111536208Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.332611563608require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.343011963240K2ControllerItem->execute( ).../k2.php:64
90.343011963240K2ControllerItem->display( ).../BaseController.php:710
100.354512613944K2ControllerItem->display( ).../item.php:78
110.354512613944K2ControllerItem->display( ).../controller.php:19
120.359912984984Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.361913005352K2ViewItem->display( ).../ViewController.php:102
140.432115827000K2ViewItem->display( ).../view.html.php:742
150.432115827000K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.435115999936include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
  • Published in VPN
  • Read 3639 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.0017414672{main}( ).../index.php:0
20.09774265312Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.09774265312Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.329911456504Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.331011480880Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.332111536208Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.332611563608require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.343011963240K2ControllerItem->execute( ).../k2.php:64
90.343011963240K2ControllerItem->display( ).../BaseController.php:710
100.354512613944K2ControllerItem->display( ).../item.php:78
110.354512613944K2ControllerItem->display( ).../controller.php:19
120.359912984984Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.361913005352K2ViewItem->display( ).../ViewController.php:102
140.432115827000K2ViewItem->display( ).../view.html.php:742
150.432115827000K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.435115999936include( '/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.