( ! ) 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.0020413600{main}( ).../index.php:0
20.07974272232Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.316713053200Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.316813053144Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.316813053520Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.316913053520Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.317013053616Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.317213091248require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.320713381928GKTemplate->__construct( ).../component.php:31
100.332013523448GKTemplateMenu->getMenuType( ).../gk.framework.php:84
110.332613567712require_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.0020413600{main}( ).../index.php:0
20.07974272232Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.316713053200Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.316813053144Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.316813053520Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.316913053520Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.317013053616Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.317213091248require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.320713381928GKTemplate->__construct( ).../component.php:31
100.334113690456GKTemplateMenu->getMenuType( ).../gk.framework.php:85
debian 6 openvpn
Logo
Print this page

debian 6 openvpn

1:安装
apt-get install openvpn iptables

2:配置服务端

cp -R /usr/share/doc/openvpn/examples/easy-rsa /etc/openvpn
cd /etc/openvpn/easy-rsa/2.0
chmod +x vars
source ./vars
./clean-all

./build-ca
这一步,您一直回车就行,不要填密码,如果要求你回答Y还是N,选Y回车

./build-key-server server

./build-key client1
这2步也跟上面一样,一路回车和选择Y回车

./build-dh

3:配置转发
vi /etc/rc.local
添加以下语句,您只要替换“208.110.73.134”为您自己的ip就行
# add iptables rule for openvpn
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j SNAT --to 208.110.73.134

4:增加服务器端conf文件
vi /etc/openvpn/openvpn.conf
增加如下内容
dev tun
proto tcp
port 1194

ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem

user nobody
group nogroup
server 10.8.0.0 255.255.255.0

persist-key
persist-tun

#status openvpn-status.log
#verb 3
client-to-client

push “redirect-gateway def1″
push “dhcp-option DNS 69.197.153.253″
push “dhcp-option DNS 69.30.192.15″

comp-lzo

ok,启动openvpn服务
/etc/init.d/openvpn start
nohup /etc/rc.local &

5:客户端安装配置
http://openvpn.net/index.php/open-source/downloads.html 下载winodws客户端
安装后,然后从服务器把以下3个文件拷贝到windows安装路径下的config目录
这3个文件分别是
/etc/openvpn/easy-rsa/2.0/keys/ca.crt
/etc/openvpn/easy-rsa/2.0/keys/client1.crt
/etc/openvpn/easy-rsa/2.0/keys/client1.key

6:增加客户端配置文件
在config增加一个配置文件,文件名为client.ovpn
内容如下:
client
dev tun
proto tcp

# The hostname/IP and port of the server.
# CHANGE THIS TO YOUR VPS IP ADDRESS
remote 208.110.73.134 1194

resolv-retry infinite
nobind

persist-key
persist-tun

ca ca.crt
cert client1.crt
key client1.key

comp-lzo
verb 3

 

 

File excerpt:/etc/sysctl.conf

net.ipv4.ip_forward=1

Issue the following command to set this variable for the current session:

echo 1 > /proc/sys/net/ipv4/ip_forward
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.0009405056{main}( ).../index.php:0
20.05481323096Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.05481323096Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.19702981440Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.19763005784Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.19823061112Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.19833078168require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.20443222256K2ControllerItem->execute( ).../k2.php:64
90.20443222256K2ControllerItem->display( ).../BaseController.php:710
100.20973491336K2ControllerItem->display( ).../item.php:78
110.20973491336K2ControllerItem->display( ).../controller.php:19
120.21073509856Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.21303530272K2ViewItem->display( ).../ViewController.php:102
140.25574076000K2ViewItem->display( ).../view.html.php:742
150.25574076000K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.25824250720include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
  • Published in Openvpn
  • Read 1723 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.0009405056{main}( ).../index.php:0
20.05481323096Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.05481323096Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.19702981440Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.19763005784Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.19823061112Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.19833078168require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.20443222256K2ControllerItem->execute( ).../k2.php:64
90.20443222256K2ControllerItem->display( ).../BaseController.php:710
100.20973491336K2ControllerItem->display( ).../item.php:78
110.20973491336K2ControllerItem->display( ).../controller.php:19
120.21073509856Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.21303530272K2ViewItem->display( ).../ViewController.php:102
140.25574076000K2ViewItem->display( ).../view.html.php:742
150.25574076000K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.25824250720include( '/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.