Openvpn (7)

给openvpn客户分配固定ip

ifconfig-pool-persist ipp.txt ipp.txt 内 就是固定 ip       在/etc/openvpn/server.conf中增加\client-config-dir /etc/openvpn/ccd然后在 /etc/openvpn/ccd目录中放针对每个客户端的个性化配置文件。文件名就用客户端名 生成key的时候输入的 "Common Name" 名字比如要设置客户端 liushiwei为 192.168.2.24 只要在 /etc/openvpn/ccd/liushiwei文件中包含一行:ifconfig-push 192.168.2.24 255.255.255.0就可以了   sudochown-R nobody:nogroup /etc/openvpn/ccd
Read more...

openvpn mtu 加速

http://openvpn.net/archive/openvpn-users/2005-03/msg00453.html http://www.wandin.net/dotclear/index.php?post/2009/01/08/OpenVPN-MTU-Size http://hi.baidu.com/ox188/blog/item/4ae1373f33d90fe455e723a4.html http://77293.blog.51cto.com/67293/102222/ http://www.ixpub.net/thread-2059879-1-1.html Code - XML/HTML[url=]Plain Text[/url] # openvpn_server.conf     tun-mtu 1400   tun-mtu-extra 32   mssfix 1400   # openvpn_server.conf  tun-mtu 1400  tun-mtu-extra 32  mssfix 1400
Read more...

debian 6 openvpn

1:安装apt-get install openvpn iptables 2:配置服务端 cp -R /usr/share/doc/openvpn/examples/easy-rsa /etc/openvpncd /etc/openvpn/easy-rsa/2.0chmod +x varssource ./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 openvpniptables -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 tunproto tcpport 1194 ca /etc/openvpn/easy-rsa/2.0/keys/ca.crtcert /etc/openvpn/easy-rsa/2.0/keys/server.crtkey /etc/openvpn/easy-rsa/2.0/keys/server.keydh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem user nobodygroup nogroupserver 10.8.0.0 255.255.255.0 persist-keypersist-tun #status openvpn-status.log#verb 3client-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 startnohup /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内容如下:clientdev tunproto tcp # The hostname/IP and port of the server.# CHANGE THIS TO YOUR VPS IP ADDRESSremote 208.110.73.134 1194 resolv-retry infinitenobind persist-keypersist-tun ca ca.crtcert client1.crtkey…
Read more...

OPENVPN centos nat

/etc/openvpn/server-tcp.conf /etc/openvpn/server-udp.conf server 192.168.21.0 255.255.255.0 192.168.31.0 push "dhcp-option DNS 8.8.8.8" nat masquad 192.168.21.0 192.168.31.0
Read more...

CentOS OpenVPN一键安装包

rpm -q rpmforge-release rpm -e rpmforge-release-0.5.1-1.el5.rf   新版 selinux 解决方案   semanage port -m -t openvpn_port_t -p tcp 443   semanage port -a -t openvpn_port_t -p udp 443 semanage port -l | grep 443 发现 http_port_t 占用 443 [[email protected] ~]# semanage port -d -t http_port_t -p tcp 443/usr/sbin/semanage: Port tcp/443 is defined in policy, cannot be deleted   [[email protected] ~]# semanage port -a -t openvpn_port_t -p tcp 443/usr/sbin/semanage: Port tcp/443 already defined   [[email protected] ~]# /usr/sbin/semanage port -m -t openvpn_port_t -p tcp 443 开机启动 chkconfig openvpn on MTU 设置 客户端 服务器 都需要 tun-mtu 1400 tun-mtu-extra 32 mssfix 1400 安装时候 注意 openvpn 版本 打开…
Read more...

( ! ) 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/category.php on line 191
Call Stack
#TimeMemoryFunctionLocation
10.0003398392{main}( ).../index.php:0
20.03051348768Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.03051348768Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.11832790888Joomla\CMS\Application\SiteApplication->dispatch( $component = ??? ).../SiteApplication.php:233
50.11872815288Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_k2', $params = ??? ).../SiteApplication.php:194
60.11912870640Joomla\CMS\Component\ComponentHelper::executeComponent( $path = '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:377
70.11922887696require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php ).../ComponentHelper.php:402
80.12253019936K2ControllerItemlist->execute( $task = 'category' ).../k2.php:64
90.12253019936K2ControllerItemlist->display( $cachable = ???, $urlparams = ??? ).../BaseController.php:710
100.12483043560K2ControllerItemlist->display( $cachable = TRUE, $urlparams = ['limit' => 'UINT', 'limitstart' => 'UINT', 'id' => 'INT', 'tag' => 'STRING', 'searchword' => 'STRING', 'day' => 'INT', 'year' => 'INT', 'month' => 'INT', 'print' => 'INT', 'lang' => 'CMD', 'Itemid' => 'INT', 'ordering' => 'CMD', 'm' => 'INT', 'amp' => 'INT', 'tmpl' => 'CMD', 'template' => 'CMD'] ).../itemlist.php:49
110.12483043560K2ControllerItemlist->display( $cachable = TRUE, $urlparams = ['limit' => 'UINT', 'limitstart' => 'UINT', 'id' => 'INT', 'tag' => 'STRING', 'searchword' => 'STRING', 'day' => 'INT', 'year' => 'INT', 'month' => 'INT', 'print' => 'INT', 'lang' => 'CMD', 'Itemid' => 'INT', 'ordering' => 'CMD', 'm' => 'INT', 'amp' => 'INT', 'tmpl' => 'CMD', 'template' => 'CMD'] ).../controller.php:19
120.12543051072Joomla\CMS\Cache\Controller\ViewController->get( $view = class K2ViewItemlist { public $document = class Joomla\CMS\Document\HtmlDocument { public $_links = [...]; public $_custom = [...]; public $template = NULL; public $baseurl = NULL; public $params = NULL; public $_file = NULL; protected $_template = ''; protected $_template_tags = [...]; protected $_caching = NULL; private $_html5 = NULL; public $title = 'Openvpn'; public $description = ''; public $link = ''; public $base = 'https://www.shan.info/itemlist/category/82-openvpn.html'; public $language = 'en-gb'; public $direction = 'ltr'; public $_generator = 'Joomla! - Open Source Content Management'; public $_mdate = ''; public $_tab = '\t'; public $_lineEnd = '\n'; public $_charset = 'utf-8'; public $_mime = 'text/html'; public $_namespace = ''; public $_profile = ''; public $_scripts = [...]; public $_script = [...]; protected $scriptOptions = [...]; public $_styleSheets = [...]; public $_style = [...]; public $_metaTags = [...]; public $_engine = NULL; public $_type = 'html'; protected $mediaVersion = '15dbf078d61dbbf76811992dd0143dd9' }; protected $_name = 'itemlist'; protected $_models = ['item' => class K2ModelItem { ... }, 'itemlist' => class K2ModelItemlist { ... }]; protected $_basePath = '/var/www/vhosts/shan.info/httpdocs/components/com_k2'; protected $_defaultModel = 'itemlist'; protected $_layout = 'category'; protected $_layoutExt = 'php'; protected $_layoutTemplate = '_'; protected $_path = ['template' => [...], 'helper' => [...]]; protected $_template = '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/category_item.php'; protected $_output = '\n<article class="itemView groupPrimary"> \t\n\t\t<time datetime="2011-05-15T10:07:44+02:00">\n\t\t15 May\t</time>\n\t\t\t\n\t<section>\t\t\n\t\t<header>\n\t\t\t\t\n\t\t\t\t\t\t<h2>\n\t\t\t\t\t\t\t\t\t\t<a href="/item/208-centos-openvpn一键安装包.html">CentOS OpenVPN一键安装包</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\n\t\t\t<ul>\n\t\t\t\t\t\t\t\t<li class="itemCategory"> <span>Published in</span> <a href="/itemlist/category/82-openvpn.html">Openvpn</a> </li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\'; protected $_escape = 'htmlspecialchars'; protected $_charset = 'UTF-8'; protected $_errors = []; public $baseurl = ''; public $now = '2021-01-28 12:55:34'; public $nullDate = '0000-00-00 00:00:00'; public $category = class TableK2Category { public $id = '82'; public $name = 'Openvpn'; public $alias = 'openvpn'; public $description = ''; public $parent = '0'; public $extraFieldsGroup = '0'; public $published = '1'; public $image = '/components/com_k2/images/placeholder/category.png'; public $access = '1'; public $ordering = '21'; public $params = '{"inheritFrom":"0","theme":"","num_leading_items":"0","num_leading_columns":"1","leadingImgSize":"Large","num_primary_items":"10","num_primary_columns":"1","primaryImgSize":"Medium","num_secondary_items":"0","num_secondary_columns":"1","secondaryImgSize":"Small","num_links":"0","num_links_columns":"1","linksImgSize":"XSmall","catCatalogMode":"0","catFeaturedItems":"1","catOrdering":"","catPagination":"2","catPaginationResults":"1","catTitle":"1","catTitleItemCounter":"1","catDescription":"0","catImage":"0",'; public $trash = '0'; public $plugins = ''; public $language = '*'; protected $_tbl = '#__k2_categories'; protected $_tbl_key = 'id'; protected $_tbl_keys = [...]; protected $_db = class JDatabaseDriverMysqli { ... }; protected $_trackAssets = FALSE; protected $_rules = NULL; protected $_locked = FALSE; protected $_autoincrement = TRUE; protected $_observers = class JObserverUpdater { ... }; protected $_columnAlias = [...]; protected $_jsonEncode = [...]; protected $_errors = [...]; public $metaDescription = NULL; public $metaKeywords = NULL; public $metaRobots = NULL; public $metaAuthor = NULL; public $link = '/itemlist/category/82-openvpn.html'; public $text = ''; public $jcfields = [...]; public $event = class stdClass { ... } }; public $user = class Joomla\CMS\User\User { protected $isRoot = FALSE; public $id = 0; public $name = NULL; public $username = NULL; public $email = NULL; public $password = NULL; public $password_clear = ''; public $block = NULL; public $sendEmail = 0; public $registerDate = NULL; public $lastvisitDate = NULL; public $activation = NULL; public $params = NULL; public $groups = [...]; public $guest = 1; public $lastResetTime = NULL; public $resetCount = NULL; public $requireReset = NULL; protected $_params = class Joomla\Registry\Registry { ... }; protected $_authGroups = NULL; protected $_authLevels = [...]; protected $_authActions = NULL; protected $_errorMsg = NULL; protected $userHelper = class Joomla\CMS\User\UserWrapper { ... }; protected $_errors = [...]; public $aid = 0; public $gid = 1 }; public $feed = 'https://www.shan.info/itemlist/category/82-openvpn.html&format=feed&Itemid=53'; public $leading = []; public $primary = [0 => class stdClass { ... }, 1 => class stdClass { ... }, 2 => class stdClass { ... }, 3 => class stdClass { ... }, 4 => class stdClass { ... }, 5 => class stdClass { ... }, 6 => class stdClass { ... }]; public $secondary = []; public $links = []; public $params = class Joomla\Registry\Registry { protected $data = class stdClass { ... }; protected $initialized = TRUE; public $separator = '.' }; public $pagination = class Joomla\CMS\Pagination\Pagination { public $limitstart = 0; public $limit = 10; public $total = 7; public $prefix = ''; public $pagesStart = 1; public $pagesStop = 1; public $pagesCurrent = 1; public $pagesTotal = 1; public $hideEmptyLimitstart = FALSE; protected $viewall = FALSE; protected $additionalUrlParams = [...]; protected $app = class Joomla\CMS\Application\SiteApplication { ... }; protected $data = NULL }; public $item = class stdClass { public $id = '208'; public $title = 'CentOS OpenVPN一键安装包'; public $alias = 'centos-openvpn一键安装包'; public $catid = '82'; public $published = '1'; public $introtext = 'rpm -q&nbsp;rpmforge-release rpm -e&nbsp;rpmforge-release-0.5.1-1.el5.rf &nbsp; 新版 selinux 解决方案 &nbsp; semanage port -m -t openvpn_port_t -p tcp 443 &nbsp; semanage port -a -t openvpn_port_t -p udp 443 semanage port -l | grep 443 发现&nbsp;http_port_t 占用 443 [[email protected] ~]# semanage port -d -t http_port_t -p tcp 443/usr/sbin/semanage: Port tcp/443 is defined in policy, cannot be deleted &nbsp; [[email protected] ~]# semanage port -a -t openvpn_port_t -p tcp 443/usr/sbin/semanage: Port tcp/443 alre'; public $fulltext = ''; public $video = NULL; public $gallery = NULL; public $extra_fields = NULL; public $extra_fields_search = ''; public $created = '2011-05-15 08:07:44'; public $created_by = '63'; public $created_by_alias = ''; public $checked_out = '0'; public $checked_out_time = '0000-00-00 00:00:00'; public $modified = '2012-10-14 02:07:15'; public $modified_by = '0'; public $publish_up = '2011-05-15 08:05:20'; public $publish_down = '0000-00-00 00:00:00'; public $trash = '0'; public $access = '1'; public $ordering = '5'; public $featured = '0'; public $featured_ordering = '0'; public $image_caption = ''; public $image_credits = ''; public $video_caption = ''; public $video_credits = ''; public $hits = '4910'; public $params = class Joomla\Registry\Registry { ... }; public $metadesc = ''; public $metadata = ''; public $metakey = ''; public $plugins = ''; public $language = '*'; public $categoryname = 'Openvpn'; public $categoryid = '82'; public $categoryalias = 'openvpn'; public $categoryparams = '{"inheritFrom":"0","theme":"","num_leading_items":"0","num_leading_columns":"1","leadingImgSize":"Large","num_primary_items":"10","num_primary_columns":"1","primaryImgSize":"Medium","num_secondary_items":"0","num_secondary_columns":"1","secondaryImgSize":"Small","num_links":"0","num_links_columns":"1","linksImgSize":"XSmall","catCatalogMode":"0","catFeaturedItems":"1","catOrdering":"","catPagination":"2","catPaginationResults":"1","catTitle":"1","catTitleItemCounter":"1","catDescription":"0","catImage":"0",'; public $itemGroup = 'primary'; public $category = class TableK2Category { ... }; public $link = '/item/208-centos-openvpn一键安装包.html'; public $printLink = '/item/208-centos-openvpn一键安装包.html?tmpl=component&amp;print=1'; public $tags = [...]; public $imageXSmall = ''; public $imageSmall = ''; public $imageMedium = ''; public $imageLarge = ''; public $imageXLarge = ''; public $rawTitle = 'CentOS OpenVPN一键安装包'; public $author = class Joomla\CMS\User\User { ... }; public $text = 'rpm -q&nbsp;rpmforge-release rpm -e&nbsp;rpmforge-release-0.5.1-1.el5.rf &nbsp; 新版 selinux 解决方案 &nbsp; semanage port -m -t openvpn_port_t -p tcp 443 &nbsp; semanage port -a -t openvpn_port_t -p udp 443 semanage port -l | grep 443 发现&nbsp;http_port_t 占用 443 [[email protected] ~]# semanage port -d -t http_port_t -p tcp 443/usr/sbin/semanage: Port tcp/443 is defined in policy, cannot be deleted &nbsp; [[email protected] ~]# semanage port -a -t openvpn_port_t -p tcp 443/usr/sbin/semanage: Port tcp/443 alre'; public $event = class stdClass { ... }; public $jcfields = [...]; public $image = ''; public $imageWidth = '400' } }, $method = 'display', $id = ???, $wrkarounds = ??? ).../BaseController.php:663
130.12593071760K2ViewItemlist->display( $tpl = ??? ).../ViewController.php:102
140.17223932072K2ViewItemlist->display( $tpl = NULL ).../view.html.php:1407
150.17223932072K2ViewItemlist->loadTemplate( $tpl = NULL ).../HtmlView.php:230
160.17284008896include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/category.php ).../HtmlView.php:701