{"id":530416,"date":"2021-08-30T17:46:23","date_gmt":"2021-08-30T09:46:23","guid":{"rendered":"http:\/\/4563.org\/?p=530416"},"modified":"2021-08-30T17:46:23","modified_gmt":"2021-08-30T09:46:23","slug":"wireguard%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=530416","title":{"rendered":"wireguard\u95ee\u9898"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>Qcc<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>wireguard\u95ee\u9898<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 Qcc \u4e8e 2021-8-30 16:37 \u7f16\u8f91 <\/p>\n<p> WireGuard\u673a\u5668A\u6709\u516c\u7f51ip\u4f5c\u4e3a\u4e2d\u7ee7\u8282\u70b9 \u73b0\u5728\u53ef\u4ee5\u76f4\u63a5\u4ee3\u7406peerB\u4e0a\u7f51 \u6211\u73b0\u5728\u60f3\u8ba9\u548cA\u673a\u5668\u540c\u5185\u7f51\u7684\u673a\u5668C\u4ee3\u7406peerB\u4e0a\u7f51\u9700\u8981\u5728\u673a\u5668A\u4e0a\u600e\u4e48\u8bbe\u7f6e\u554a \u73b0\u5728\u673a\u5668C\u53ef\u4ee5\u4ee3\u7406\u540c\u5185\u7f51\u5176\u4ed6\u673a\u5668\u4e0a\u7f51<\/p>\n<p>  \u673a\u5668A\u548c\u673a\u5668C\u901a\u8fc7\u4e09\u5c42\u4ea4\u6362\u4e92\u8054<br \/>  \u673a\u5668A\u4e2d\u7ee7\u8282\u70b9 \u5185\u7f51ip 10.59.159.2\/16&nbsp; &nbsp;<br \/>  \u673a\u5668C\u5e0c\u671b\u4ee3\u7406\u4e0a\u7f51\u7684\u8282\u70b9 \u5185\u7f51ip 10.18.0.6\/16<\/p>\n<p>  \u4e2d\u7ee7\u8282\u70b9wg0.conf\u5185\u5bb9<\/p>\n<p>  Address = 10.88.88.1\/24<br \/>  ListenPort = 17147<br \/>  PrivateKey = MLnqVHKzusjOyIurq0GbvP\/*******************************<\/p>\n<p>  PublicKey = 0YW0BeKLYGcjztGe7nfEYn*******************************<br \/>  AllowedIPs = 10.88.88.2\/32<br \/>  PresharedKey = iu5CNBaZGBRkRIOvNbu*******************************<br \/>  PersistentKeepalive = 25<\/p>\n<p>  \u5f02\u5730peerB\u914d\u7f6e<\/p>\n<p>  PrivateKey = qNUW4xtDZWQiQSY7PGh7**********************<br \/>  Address = 10.88.88.2\/24<br \/>  DNS = 114.114.114.114.223.5.5.5<\/p>\n<p>  PublicKey = yTZQhdKCSbzaqfbpLQ5fpU**********************<br \/>  PresharedKey = iu5CNBaZGBRkRIOvNbu+**********************<br \/>  AllowedIPs = 0.0.0.0\/0<br \/>  Endpoint = *.*.*.*:17147  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>optimism<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u7b49\u4e2a\u5927\u4f6c&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>h20<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tNAT\u4e00\u4e0b\u4e0d\u5c31\u5b8c\u4e8b\u4e86\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u9a6c\u5316\u6ed5<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tiptables -t nat -A PREROUTING -p udp &#8211;dport 53 -j REDIRECT &#8211;to-ports 53<br \/>  iptables -t nat -A PREROUTING -p tcp &#8211;dport 53 -j REDIRECT &#8211;to-ports 53<\/p>\n<p>  \u8fd9\u4e2a\u52a0\u4e86\u4e48\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Qcc<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\th20 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-8-30 16:08<br \/>  NAT\u4e00\u4e0b\u4e0d\u5c31\u5b8c\u4e8b\u4e86<\/p>\n<p> \u6211\u628a\u914d\u7f6e\u8d34\u51fa\u6765\u4e86 \u5e2e\u5fd9\u770b\u4e00\u4e0b\u8c22\u8c22\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Qcc<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u9a6c\u5316\u6ed5 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-8-30 16:32<br \/>  iptables -t nat -A PREROUTING -p udp &#8211;dport 53 -j REDIRECT &#8211;to-ports 53<br \/>  iptables -t nat -A PREROUT &#8230;<\/p>\n<p> \u673a\u5668A\u73b0\u5728\u4ee3\u7406 peerB\u4e0a\u7f51\u662f\u6b63\u5e38\u7684 \u6211\u60f3\u901a\u8fc7\u5185\u7f51\u8f6c\u7531\u53e6\u4e00\u4e2a\u673a\u5668C\u6765\u4ee3\u7406 \u56e0\u4e3a\u673a\u5668A\u548c\u673a\u5668C\u7684\u51fa\u53e3\u94fe\u8def\u4e0d\u540c \u5982\u679cpeerB\u6765\u76f4\u8fde\u673a\u5668C\u7684\u8bdd\u5ef6\u8fdf\u4e09\u4f4d\u6570 \u76f4\u8fde\u673a\u5668A\u5ef6\u8fdf10-20\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u9a6c\u5316\u6ed5<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u673a\u5668C\u88c5\u4e00\u4e2awire\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Qcc \u5927\u4f6c\u6709\u8bdd\u8bf4 : wireg&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\/530416"}],"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=530416"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/530416\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=530416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=530416"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=530416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}