﻿{"id":114,"date":"2010-05-22T15:35:41","date_gmt":"2010-05-22T07:35:41","guid":{"rendered":"http:\/\/nick.workao.org\/?p=114"},"modified":"2010-05-22T15:35:49","modified_gmt":"2010-05-22T07:35:49","slug":"openvz-ubuntu%e5%ae%89%e8%a3%85openvpn%e5%b9%b6%e9%85%8d%e7%bd%aeiptables%e9%98%b2%e7%81%ab%e5%a2%99","status":"publish","type":"post","link":"https:\/\/nick.txtcc.com\/index.php\/linux\/114","title":{"rendered":"openvz ubuntu\u5b89\u88c5openvpn\u5e76\u914d\u7f6eiptables\u9632\u706b\u5899"},"content":{"rendered":"<p>\u5bf9\u4e8e\u4e70\u4e86openvz  vps\uff0c\u60f3\u5f00\u7acbvpn\u7684\u670b\u53cb\u4eec\uff0c\u9996\u5148\u5e94\u8be5\u53d1\u9001Ticket\u8054\u7edc\u4f60\u7684\u63d0\u4f9b\u5546\uff0c\u5f00\u542fTUN\/TAP\u548ciptables\u76f8\u5173\u7684\u6a21\u5757\uff0c\u5e76\u5f00\u542fiptables\u76f8\u5173 \u7684\u7ec4\u4ef6\u3002<\/p>\n<p>\u6211\u4eec\u5148\u68c0\u6d4b\u4e0b\u662f\u5426\u5df1\u7ecf\u6709\u5f00\u901atun\u548ctap\uff0c\u68c0\u6d4b\u662f\u5426\u5f00\u542ftun\u529f\u80fd\u7684\u65b9\u6cd5\u662f\uff1a<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p131\">\n<td id=\"p13code1\">\n<pre>lsmod | grep tun<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u5982\u679c\u6ca1\u6709\u663e\u793a\uff0c \u518d\u8bd5\u8bd5\u4e0b\u9762\u7684\u547d\u4ee4<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p132\">\n<td id=\"p13code2\">\n<pre>modprobe tun<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u8fd9\u79cd\u68c0\u6d4b\u624b\u6bb5\u5e76\u4e0d\u5f88\u51c6\u786e\uff0c\u4e3a\u4e86\u4fdd\u9669\u8d77\u89c1 \uff0c\u4f60\u8fd8\u662f\u8054\u7cfb\u4e0b\u63d0\u4f9b\u5546\uff0c\u8bb0\u4f4f\uff0c\u4e00 \u5b9a\u8981\u5f00\u542fTUN\/TAP\u548ciptables\u76f8\u5173\u7ec4\u4ef6\uff0c\u4e0d\u7136\u914d\u7f6e\u4f1a\u4e0d\u6210\u529f\u3002<\/p>\n<p>\u7b49\u5f85\u63d0\u4f9b\u5546\u4e3a\u4f60\u5f00\u542f\u4e86\u76f8\u5173\u529f\u80fd\u540e\uff0c\u4e0b\u9762\u5c31\u6b63\u5f0f\u52a8\u624b\u8fdb\u884c\u914d\u7f6e\u4e86\u3002<\/p>\n<p>\u4ee5\u4e0b\u547d\u4ee4\u90fd\u662f\u5728\u547d\u4ee4\u884c\u8fdb\u884c\u624b\u52a8\u6572\u5165\u7684\uff0c\u56e0\u4e3a\u81ea\u52a8\u5316\u811a\u672c\u5e76\u4e0d\u80fd\u89e3\u51b3\u5728\u5b89\u88c5openvpn\u8fc7\u7a0b\u4e2d\u9047\u5230\u7684\u5404\u79cd\u5c0f\u95ee\u9898\uff0c\u6240\u4ee5\u9700\u8981\u624b\u52a8\u6765\u914d\u7f6e\uff0c\u624d\u80fd\u6700\u540e\u8ba9  openvpn\u6b63\u5e38\u8fd0\u4f5c\u3002\u6240\u4ee5\u8bf7\u5927\u5bb6\u8010\u5fc3\u7684\u8fdb\u884c\u590d\u5236\u7c98\u8d34\u3002\u51fa\u73b0\u4e86\u9519\u8bef\uff0c\u4ed4\u7ec6\u5206\u6790\u524d\u56e0\u540e\u679c\u3002<\/p>\n<p>\u8bb0\u4f4f\u9700\u8981\u4f7f\u7528\u5230\u7684\u5e38\u91cf\uff0c\u5728\u4e0b\u9762\u8f93\u5165\u7684\u65f6\u5019\uff0c\u8981\u8bb0\u5f97\u7528\u8fd9\u4e9b\u53d8\u91cf\u7684\u503c\uff0c\u66ff\u6362\u53d8\u91cf\uff0c\u4e0d\u8981\u539f\u5c01\u4e0d\u52a8\u7684\u590d\u5236\u7c98\u8d34\u4ee3\u7801\u3002<\/p>\n<p>$HOSTNAME \u4f60\u7684vps\u670d\u52a1\u5668\u7684\u673a\u5668\u540d\uff0c\u53ef\u8f93\u5165hostname\u547d\u4ee4\u83b7\u53d6<\/p>\n<p>$IP \u4f60vps\u5bf9\u5916\u7684IP\u5730\u5740\uff0c\u516c\u7f51IP\uff0c\u53ef\u8f93\u5165ifconfig\u67e5\u8be2\u3002<\/p>\n<p>\u670d\u52a1\u5668\u5b89\u88c5\u914d\u7f6e<\/p>\n<p>\u5b89\u88c5openvpn\u5f00\u59cb\uff0c\u5148\u66f4\u65b0\u4e0b\u6e90<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p133\">\n<td id=\"p13code3\">\n<pre>apt-get update<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u5b89\u88c5openvpn\u548c\u5fc5\u987b\u7684\u7c7b\u5e93<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p134\">\n<td id=\"p13code4\">\n<pre>apt-get install openvpn libssl-dev  openssl<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u8f6c\u5230openvpn\u7684\u914d\u7f6e\u6587\u4ef6\u5939<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p135\">\n<td id=\"p13code5\">\n<pre>cd \/etc\/openvpn\/<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u62f7\u8d1d\u5de5\u5177\u8fc7\u6765\uff0c\u51c6\u5907\u751f\u6210Key<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p136\">\n<td id=\"p13code6\">\n<pre>cp -R \/usr\/share\/doc\/openvpn\/examples\/easy-rsa\/ \/etc\/openvpn\/<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u8fdb\u5165\u5de5\u4f5c\u76ee\u5f55<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p137\">\n<td id=\"p13code7\">\n<pre>cd \/etc\/openvpn\/easy-rsa\/2.0\/<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u6539\u53d8\u6587\u4ef6\u53ef\u6267\u884c\u72b6\u6001<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p138\">\n<td id=\"p13code8\">\n<pre>chmod +rwx *<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff0c\u4fee\u6539\u9ed8\u8ba4\u7528\u6237\u4fe1\u606f vim .\/vars<\/p>\n<p>\u627e\u5230\u4e0b\u5217\u5185\u5bb9\u8fdb\u884c\u66ff\u6362\u6210\u4f60\u81ea\u5df1\u7684\uff0c\u6bd4\u5982\u56fd\u5bb6\u53ef\u4ee5\u81eaUS\u6539\u6210CN<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p139\">\n<td id=\"p13code9\">\n<pre>    export KEY_COUNTRY=\u201cUS\u201d\n\u00a0\n    export KEY_PROVINCE=\u201cCA\u201d\n\u00a0\n    export KEY_CITY=\u201cSanFrancisco\u201d\n\u00a0\n    export KEY_ORG=\u201cFort-Funston\u201d\n\u00a0\n    export KEY_EMAIL=\u201cme@myhost.mydomain\u201d<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u7f16\u8f91\u5b8c\u6bd5\u540e\uff0c\u4fdd\u5b58\u4e00\u4e0b\uff0c\u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1310\">\n<td id=\"p13code10\">\n<pre>source vars\n\u00a0\n    .\/clean-all\n\u00a0\n    .\/build-dh\n\u00a0\n    .\/pkitool --initca\n\u00a0\n    .\/pkitool --server server<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u8fdb\u5165key\u76ee\u5f55<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1311\">\n<td id=\"p13code11\">\n<pre>cd keys<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u751f\u6210key<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1312\">\n<td id=\"p13code12\">\n<pre>    openvpn --genkey --secret ta.key\n\u00a0\n    cp  .\/{ca.crt,ca.key,ta.key,server.crt,server.key,dh1024.pem} \/etc\/openvpn\/<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u7f16\u8f91openvpn\u914d\u7f6e\u6587\u4ef6<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1313\">\n<td id=\"p13code13\">\n<pre>vim \/etc\/openvpn\/openvpn.conf<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u7528\u4e0b\u9762\u7684\u5185\u5bb9\u66ff\u6362\u539f\u6765\u7684\u5185\u5bb9<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1314\">\n<td id=\"p13code14\">\n<pre>    port 1194\n\u00a0\n    proto udp\n\u00a0\n    dev tun\n\u00a0\n    ca ca.crt\n\u00a0\n    cert server.crt\n\u00a0\n    key server.key\n\u00a0\n    dh dh1024.pem\n\u00a0\n    server 10.8.0.0 255.255.255.0\n\u00a0\n    push \u201credirect-gateway def1\u201d\n\u00a0\n    push \u201cdhcp-option DNS 8.8.8.8\u201d\n\u00a0\n    push \u201cdhcp-option DNS 8.8.4.4\u201d\n\u00a0\n    ifconfig-pool-persist ipp.txt\n\u00a0\n    keepalive 10 120\n\u00a0\n    client-to-client\n\u00a0\n    comp-lzo\n\u00a0\n    user daemon\n\u00a0\n    group daemon\n\u00a0\n    persist-key\n\u00a0\n    persist-tun\n\u00a0\n    status openvpn-status.log\n\u00a0\n    verb 3<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u914d\u7f6e\u6587\u4ef6\u4fdd\u5b58\u540e\uff0c\u73b0\u5728\u5f00\u59cb\u914d\u7f6e\u7f51\u7edc\u76f8\u5173\u8bbe\u7f6e\uff0c\u5148\u5f00\u542f\u8f6c\u53d1\u529f\u80fd<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1315\">\n<td id=\"p13code15\">\n<pre>echo \u201cnet.ipv4.ip_forward=1\u201d >> \/etc\/sysctl.conf<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u4f7f\u8bbe\u5b9a\u751f\u6548<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1316\">\n<td id=\"p13code16\">\n<pre>sysctl -p<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u5f00\u59cb\u914d\u7f6e\u9632\u706b\u5899\u4e86\uff0c\u5148\u6e05\u7a7a\u9632\u706b\u5899\u73b0\u6709\u7684\u8bbe\u7f6e\uff0c\u9047\u5230\u9519\u8bef\uff0c\u4e0d\u7528\u7ba1\u5b83\uff0c\u8fdb\u884c\u4e0b\u4e00\u4e2a\u64cd\u4f5c\u3002<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1317\">\n<td id=\"p13code17\">\n<pre>iptables -t nat -F\n\u00a0\n    iptables -t nat -X\n\u00a0\n    iptables -t nat -P PREROUTING ACCEPT\n\u00a0\n    iptables -t nat -P POSTROUTING ACCEPT\n\u00a0\n    iptables -t nat -P OUTPUT ACCEPT\n\u00a0\n    iptables -t mangle -F\n\u00a0\n    iptables -t mangle -X\n\u00a0\n    iptables -t mangle -P PREROUTING ACCEPT\n\u00a0\n    iptables -t mangle -P INPUT ACCEPT\n\u00a0\n    iptables -t mangle -P FORWARD ACCEPT\n\u00a0\n    iptables -t mangle -P OUTPUT ACCEPT\n\u00a0\n    iptables -t mangle -P POSTROUTING ACCEPT\n\u00a0\n    iptables -F\n\u00a0\n    iptables -X\n\u00a0\n    iptables -P FORWARD ACCEPT\n\u00a0\n    iptables -P INPUT ACCEPT\n\u00a0\n    iptables -P OUTPUT ACCEPT\n\u00a0\n    iptables -t raw -F\n\u00a0\n    iptables -t raw -X\n\u00a0\n    iptables -t raw -P PREROUTING ACCEPT\n\u00a0\n    iptables -t raw -P OUTPUT ACCEPT<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u8bbe\u7f6e\u9632\u706b\u5899\uff0c\u5141\u8bb8nat\uff0c\u7aef\u53e3\u8f6c\u53d1\u548c\u5e38\u7528\u7684\u670d\u52a1\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\u7b2c\u4e00\u884c\u7684-o venet0  \u5728openvz\u4e0b\u9762\u662fvenet0,\u5728xen\u4e0b\u9762\u53ef\u80fd\u662feth0\uff0c\u8fd9\u662f\u7f51\u5361\u7684\u7f16\u53f7\uff0c\u5927\u5bb6\u53ef\u4ee5\u7528ifconfig\u67e5\u770b\uff0c\u770b\u7b2c\u4e00\u5757\u7f51\u5361\u662feth0\u8fd8\u662f  venet0\uff0c\u4e0d\u8981\u641e\u9519\u4e86\uff0c\u641e\u9519\u4e86\u5c31\u8bbf\u95ee\u4e0d\u4e86\u5916\u9762\u7684\u4e92\u8054\u7f51\u3002<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1318\">\n<td id=\"p13code18\">\n<pre> iptables -t nat -A POSTROUTING -s 10.8.0.0\/24 -o venet0 -j MASQUERADE\n\u00a0\n    iptables -A INPUT -i lo -j ACCEPT\n\u00a0\n    iptables -A INPUT -i ! lo -d 127.0.0.0\/8 -j REJECT\n\u00a0\n    iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT\n\u00a0\n    iptables -A OUTPUT -j ACCEPT\n\u00a0\n    iptables -A INPUT -p tcp --dport 80 -j ACCEPT\n\u00a0\n    iptables -A INPUT -p tcp --dport 3306 -j ACCEPT\n\u00a0\n    iptables -A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT\n\u00a0\n    iptables -A INPUT -p udp --dport 1194 -j ACCEPT\n\u00a0\n    iptables -A INPUT -s 10.8.0.0\/24 -p all -j ACCEPT\n\u00a0\n    iptables -A FORWARD -d 10.8.0.0\/24 -j ACCEPT\n\u00a0\n    iptables -A INPUT -i tun+ -j ACCEPT\n\u00a0\n    iptables -A FORWARD -i tun+ -j ACCEPT\n\u00a0\n    iptables -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT\n\u00a0\n    iptables -A INPUT -m limit --limit 5\/min -j LOG --log-prefix \u201ciptables denied: \u201d --log-level 7\n\u00a0\n    iptables -A INPUT -j REJECT\n\u00a0\n    iptables -A FORWARD -j REJECT<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u4fdd\u5b58 \u9632\u706b\u5899\u89c4\u5219\uff0c\u8ba9\u5b83\u5728\u4e0b\u6b21\u542f\u52a8\u7cfb\u7edf\u65f6\u81ea\u52a8\u751f\u6548<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1319\">\n<td id=\"p13code19\">\n<pre>iptables-save > \/etc\/iptables.up.rules<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u65b0\u5efa\u7f51\u7edc\u542f\u52a8\u65f6\u52a0\u8f7d\u7684\u811a\u672c vim \/etc\/network\/if-pre-up.d\/iptables\n\u8f93\u5165\u4e0b\u9762\u7684\u5185\u5bb9<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1320\">\n<td id=\"p13code20\">\n<pre>#!\/bin\/bash\n\u00a0\n    \/sbin\/iptables-restore < \/etc\/iptables.up.rules<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u6539\u53d8\u6267\u884c\u6743\u9650<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1321\">\n<td id=\"p13code21\">\n<pre>chmod a+x \/etc\/network\/if-pre-up.d\/iptables<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u7b49\u4e0b\u6b21\u4f60\u542f\u52a8\u7cfb\u7edf\u7684\u65f6\u5019\uff0c\u9632\u706b\u5899\u5c31\u4f1a\u4ee5\u73b0\u5728\u7684\u89c4\u5219\u6267\u884c\u3002<\/p>\n<p>\u73b0\u5728\u65e2\u7136\u914d\u7f6e\u90fd\u5df1\u7ecf\u597d\u4e86\uff0c\u90a3\u5c31\u91cd\u542fopenvpn\u670d\u52a1\u5427<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1322\">\n<td id=\"p13code22\">\n<pre>\/etc\/init.d\/openvpn restart<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u5ba2\u6237\u7aef\u914d\u7f6e\u6587\u4ef6<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1323\">\n<td id=\"p13code23\">\n<pre>cd \/etc\/openvpn\/easy-rsa\/2.0\/\n\u00a0\n    source vars\n\u00a0\n    .\/pkitool client1\n\u00a0\n    cd keys\/<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u7f16\u8f91\u5ba2\u6237\u7aef\u914d\u7f6e\u6587\u4ef6 vim $HOSTNAME.ovpn<\/p>\n<p>\u8f93\u5165\u4e0b\u9762\u7684\u5185\u5bb9<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1324\">\n<td id=\"p13code24\">\n<pre>client\n\u00a0\n    remote $ip 1194\n\u00a0\n    dev tun\n\u00a0\n    comp-lzo\n\u00a0\n    ca ca.crt\n\u00a0\n    cert client1.crt\n\u00a0\n    key client1.key\n\u00a0\n    route-delay 2\n\u00a0\n    route-method exe\n\u00a0\n    redirect-gateway def1\n\u00a0\n    dhcp-option DNS 10.8.0.1\n\u00a0\n    verb 3<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u6ce8\u610f\u628a\u4e0a\u9762\u7684$ip\uff0c$HOSTNAME\u53d8\u91cf\u66ff\u6362\u4e3a\u771f\u5b9e\u7684\u4e3b\u673a\u540d\u548cIP\u5730\u5740\uff0c\u4e0d\u5f97\u6709\u8bef\n\u6253\u5305\u5bc6\u5319\uff0c\u4f9b\u5ba2\u6237\u7aef\u4f7f\u7528<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1325\">\n<td id=\"p13code25\">\n<pre>tar -zcvf  keys.tar.gz ca.crt ca.key client1.crt client1.csr client1.key ta.key $HOSTNAME.ovpn<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u79fb\u52a8\u5230Root\u7684\u4e3b\u76ee\u5f55\u4e0b\u9762<\/p>\n<div>\n<table>\n<tbody>\n<tr id=\"p1326\">\n<td id=\"p13code26\">\n<pre>mv keys.tar.gz ~\/<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u4f60\u53ef\u4ee5\u7528Winscp\u7b49\u8f6f\u4ef6\uff0c\u628a\u8fd9\u4e2a\u4e0b\u8f7d\u56de\u6765\u3002\u89e3\u538b\u653e\u5230\u4f60\u7684openvpn\u76ee\u5f55\u4e0b\u9762\u4f7f\u7528<\/p>\n<p>\u8fd9\u4e9b\u5bc6\u5319\u548c\u914d\u7f6e\u6587\u4ef6\u662f\u653e\u5728C:Program FilesOpenVPNconfig  \u4e0b\u9762\uff0c\u9700\u8981\u4f7f\u7528vpn\u7684\u65f6\u5019\uff0c\u70b9\u5f00openvpn\uff0c\u76f4\u63a5connect\u5373\u53ef\u3002<\/p>\n<p>\u5ba2\u6237\u7aef\u6211\u4eec\u7528\u7684\u662fopenvpn gui\u5de5\u5177\uff0c\u5728windows\u4e0b\u9762\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u8fde\u63a5openvpn\u670d\u52a1\u5668\u4e0a\u3002<\/p>\n<p>\u5728\u670d\u52a1\u5668\u7aef\u5df1\u7ecf\u542f\u52a8\u4e86\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u7528GUI\u5de5\u5177\u8fdb\u884c\u8fde\u63a5\u4e86\uff0c\u53f3\u952e\u70b9\u51fb\u6258\u76d8\u680f\u7684\u5c0f\u56fe\u6807\uff0c\u542f\u52a8connect\u5373\u53ef\u8fde\u63a5vpn\u4e86\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>\u5bf9\u4e8e\u4e70\u4e86openvz vps\uff0c\u60f3\u5f00\u7acbvpn\u7684\u670b\u53cb\u4eec\uff0c\u9996\u5148\u5e94\u8be5\u53d1\u9001Ticket\u8054\u7edc\u4f60\u7684\u63d0\u4f9b\u5546\uff0c\u5f00\u542fTUN\/TAP\u548ciptables\u76f8\u5173\u7684\u6a21\u5757\uff0c\u5e76\u5f00\u542fiptables\u76f8\u5173 \u7684\u7ec4\u4ef6\u3002 \u6211\u4eec\u5148\u68c0\u6d4b\u4e0b\u662f\u5426\u5df1\u7ecf\u6709&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[63,62,61,7,64],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-linux","tag-iptables","tag-openvpn","tag-openvz","tag-ubuntu","tag-vps"],"_links":{"self":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":3,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":117,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/114\/revisions\/117"}],"wp:attachment":[{"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}