{"id":162982,"date":"2020-10-03T14:22:26","date_gmt":"2020-10-03T06:22:26","guid":{"rendered":"http:\/\/4563.org\/?p=162982"},"modified":"2020-10-03T14:22:26","modified_gmt":"2020-10-03T06:22:26","slug":"%e8%af%b7%e6%95%99proxmox%e5%a4%a7%e4%bd%ac-%e6%af%8d%e9%b8%a1%e6%80%8e%e4%b9%88%e5%bc%80%e5%90%af80%e7%ab%af%e5%8f%a3%e5%95%8a","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=162982","title":{"rendered":"\u8bf7\u6559proxmox\u5927\u4f6c \u6bcd\u9e21\u600e\u4e48\u5f00\u542f80\u7aef\u53e3\u554a"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>guoaibing<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u8bf7\u6559proxmox\u5927\u4f6c \u6bcd\u9e21\u600e\u4e48\u5f00\u542f80\u7aef\u53e3\u554a<\/h3>\n<p>  \t\t\u5728ks10\u4e0a\u88c5\u4e86proxmox\u5f00nat\u5c0f\u9e21\uff0c\u597d\u4e45\u524d\u73a9\u8fc7\uff0c\u5948\u4f55\u73b0\u5728\u4e0d\u4f1a\u73a9\u4e86yc002t <\/p>\n<p>  interfaces\u6309\u4e0b\u914d\u7f6e\u597d\u4e86\uff0c\u5c0f\u9e21ssh\u4e5f\u80fd\u6b63\u5e38\u8f6c\u53d1\u8fde\u63a5<\/p>\n<p>  &nbsp; &nbsp; auto vmbr2<br \/>  &nbsp; &nbsp; iface vmbr2 inet static<br \/>  &nbsp; &nbsp; address 10.99.0.254<br \/>  &nbsp; &nbsp; netmask 255.255.255.0<br \/>  &nbsp; &nbsp; bridge_ports none<br \/>  &nbsp; &nbsp; bridge_stp off<br \/>  &nbsp; &nbsp; bridge_fd 0<br \/>  &nbsp; &nbsp; post-up echo 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward<br \/>  &nbsp; &nbsp; post-up iptables -t nat -A POSTROUTING -s &#8216;10.99.0.0\/24&#8217; -o vmbr0 -j MASQUERADE<br \/>  &nbsp; &nbsp; post-down iptables -t nat -D POSTROUTING -s &#8216;10.99.0.0\/24&#8217; -o vmbr0 -j MASQUERADE<\/p>\n<p>  &nbsp; &nbsp; post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp &#8211;dport 1022 -j DNAT &#8211;to 10.99.0.1:22<br \/>  &nbsp; &nbsp; post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp &#8211;dport 1022 -j DNAT &#8211;to 10.99.0.1:22<br \/>  &nbsp; &nbsp; post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp &#8211;dport 80 -j DNAT &#8211;to 10.99.0.1:80<br \/>  &nbsp; &nbsp; post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp &#8211;dport 80 -j DNAT &#8211;to 10.99.0.1:80<br \/>  &nbsp; &nbsp; post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp &#8211;dport 443 -j DNAT &#8211;to 10.99.0.1:443<br \/>  &nbsp; &nbsp; post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp &#8211;dport 443 -j DNAT &#8211;to 10.99.0.1:443<\/p>\n<p>  \u5c31\u662f80\u548c443\u6ca1\u6cd5\u8bbf\u95ee\uff0cnetstat -ntlp\u67e5\u770b\u8c8c\u4f3c\u6bcd\u9e2180\u3001443\u7aef\u53e3\u90fd\u6ca1\u653e\u5f00<\/p>\n<p>  https:\/\/ddcdn.jd.com\/ddimg\/jfs\/t1\/130259\/39\/11420\/35681\/5f77f136Eac9a09ce\/024ae457fd6d422d.png<\/p>\n<p>  \u8bf7\u6559\u5927\u4f6c\u662f\u8fd9\u4e2a\u539f\u56e0\u5bfc\u81f4\u7684\u4e48\uff0c\u6309\u74061022\u4e5f\u6ca1\u5f00\u653e\u548b\u80fd\u8f6c\u53d1\u5462<\/p>\n<p>  iptables -A INPUT -p tcp &#8211;dport 80 -j ACCEPT<br \/>  iptables -A OUTPUT -p tcp &#8211;sport 80 -j ACCEPT<\/p>\n<p>  \u6bcd\u9e21\u8f93\u5165\u4e0a\u9762\u547d\u4ee4\u8c8c\u4f3c80\u7aef\u53e3\u4e5f\u6ca1\u5f00\u542f\uff0c\u5927\u4f6c\u6307\u70b9\u4e0b\u554ayc002t \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>tl3821<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8bbe\u7f6e\u8981\u5b8c\u91cd\u542f\u6bcd\u9e21\u6216\u7f51\u7edc\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u7535\u5149<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u9a6c\u4e00\u4e0b\uff0c\u9274\u4e8e\u81ea\u5df1\u77e5\u8bc6\u532e\u4e4f\uff0c\u4e5f\u7b49\u4e00\u4e2a\u7b54\u6848\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>guoaibing<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\ttl3821 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-10-3 11:49<br \/>  \u8bbe\u7f6e\u8981\u5b8c\u91cd\u542f\u6bcd\u9e21\u6216\u7f51\u7edc<\/p>\n<p> \u5927\u4f6c service networking restart\u8fc7\uff0c\u6bcd\u9e21\u4e5f\u91cd\u542f\u8bd5\u8fc7\uff0c\u4e5f\u662f\u4e0d\u7ba1\u7528yc002t\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>ABCHINA<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4f60\u8fde\u6b63\u5728\u8fd0\u884c\u7684\u7aef\u53e3\u548c\u9632\u706b\u5899\u7aef\u53e3\u90fd\u6ca1\u641e\u660e\u767d\uff0c\u5f00\u653e\u4ec0\u4e48\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>guoaibing<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tABCHINA \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-10-3 11:55<br \/>  \u4f60\u8fde\u6b63\u5728\u8fd0\u884c\u7684\u7aef\u53e3\u548c\u9632\u706b\u5899\u7aef\u53e3\u90fd\u6ca1\u641e\u660e\u767d\uff0c\u5f00\u653e\u4ec0\u4e48<\/p>\n<p> \u5927\u4f6c netstat -ntlp\u662f\u663e\u793a\u6b63\u5728\u8fd0\u884c\u7684\u7aef\u53e3\u4e48proxmox\u9762\u677f\u4e0a\u9632\u706b\u5899\u9ed8\u8ba4\u662f\u5173\u95ed\u7684\u4e0d\u7528\u7ba1\u4e86\u5417\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>kra<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 kra \u4e8e 2020-10-3 12:11 \u7f16\u8f91 <\/p>\n<p> netstat \u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u88ab\u5360\u7528\u7684\u7aef\u53e3.<\/p>\n<p>  \u8981\u662f\u9632\u706b\u5899\u5f00\u653e\u7684\u7aef\u53e3\u6ca1\u6709\u88ab\u7a0b\u5e8f\u5360\u7528,\u6bd4\u598280\u7aef\u53e3\u6ca1\u6709\u7a0b\u5e8f\u5728\u7528<br \/>  \u90a3\u4e48\u4e0d\u4f1a\u4f53\u73b0\u5728netstat\u4e2d,\u751a\u81f3\u4ece\u5916\u90e8\u4e5f\u65e0\u6cd5\u68c0\u67e5.<\/p>\n<p>  \u7aef\u53e3\u5f00\u653e\u6709\u6548\u7684\u539f\u5219\u662f\u7a0b\u5e8f\u5148\u5360\u7528,\u518d\u4f7f\u7528\u9632\u706b\u5899\u5f00\u653e.\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Clever<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u9996\u5148\u4f60\u8981\u786e\u5b9a\u4f60\u7684\u6bcd\u9e21\u662f\u5426\u6709\u7a0b\u5e8f\u4f7f\u752880\u7aef\u53e3\u3002\u5982\u679c\u6ca1\u6709\u90a3\u4e48nerstat\u91cc\u9762\u4e0d\u4e00\u5b9a\u4f1a\u663e\u793a\u5176\u6b21\u4f60\u8f6c\u53d1\u4e86\uff0c\u76ee\u6807\u673a\u5668\u662f\u5426\u4f7f\u7528\u8f6c\u53d1\u768480\u7aef\u53e3\uff0c\u5982\u679c\u6ca1\u8f6c\u53d1\uff0c\u90a3\u4e48\u4e5f\u4e0d\u4f1a\u663e\u793a\u3002\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>guoaibing \u5927\u4f6c\u6709\u8bdd\u8bf4 :&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/162982"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=162982"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/162982\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=162982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=162982"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=162982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}