{"id":151,"date":"2021-10-11T04:00:52","date_gmt":"2021-10-11T11:00:52","guid":{"rendered":"https:\/\/www.xh86.me\/?p=151"},"modified":"2021-10-11T14:12:14","modified_gmt":"2021-10-11T21:12:14","slug":"windows%e4%b8%8erouteros%e7%9a%84wireguard%e8%bf%9e%e6%8e%a5","status":"publish","type":"post","link":"https:\/\/www.xh86.me\/?p=151","title":{"rendered":"Windows\u4e0eRouterOS\u7684Wireguard\u8fde\u63a5"},"content":{"rendered":"<p>WireGuard\u6709\u591a\u4e2a\u5e73\u53f0\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u5305\u62ecWindows\u7248\u672c\uff0c\u53ef\u4ee5\u4ece\u5b98\u7f51\u4e0b\u8f7d<a href=\"https:\/\/www.wireguard.com\/install\/\">https:\/\/www.wireguard.com\/install\/<\/a>\uff08\u9700\u8981\u68af\u5b50\uff09<\/p>\n<p>\u5047\u8bbeRouterOS\u5916\u7f51IP\u662f192.168.88.20\u914d\u7f6e\u5728ether1\u4e0a\uff0cWinbox\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"404\" height=\"150\" class=\"wp-image-152\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/table-description-automatically-generated-with-me-1.png\" alt=\"Table\n\nDescription automatically generated with medium confidence\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/table-description-automatically-generated-with-me-1.png 404w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/table-description-automatically-generated-with-me-1-300x111.png 300w\" sizes=\"auto, (max-width: 404px) 100vw, 404px\" \/><\/p>\n<p>windows\u7535\u8111\u4f5c\u4e3a\u8bf7\u6c42\u53d1\u8d77\u7aef\uff0cRouterOS\u4f5c\u4e3a\u63a5\u6536\u7aef\uff0c\u5206\u914d\u7ed9\u4e24\u7aef\u7684\u96a7\u9053\u4e92\u8054IP\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>RouterOS wireguard\u63a5\u53e3IP\u662f20.30.1\/24<\/li>\n<li>windows\u7684wireguard\u63a5\u53e3\u914d\u7f6e20.30.2\/24<\/li>\n<\/ul>\n<p>\u9996\u5148\uff0c\u5728RouterOS\u521b\u5efaWireGuard\u63a5\u53e3\uff0c\u9ed8\u8ba4\u7aef\u53e3\u662f13231\uff0c\u64cd\u4f5c\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"623\" height=\"377\" class=\"wp-image-153\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-descr-3.png\" alt=\"Graphical user interface, text, application\n\nDescription automatically generated\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-descr-3.png 623w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-descr-3-300x182.png 300w\" sizes=\"auto, (max-width: 623px) 100vw, 623px\" \/><\/p>\n<p>\u521b\u5efa\u63a5\u53e3\u5b8c\u6210\u540e\uff0c\u4f1a\u81ea\u52a8\u751f\u6210\u516c\u94a5\uff0c\u53ef\u67e5\u770bPublic Key<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"557\" height=\"398\" class=\"wp-image-154\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-email-9.png\" alt=\"Graphical user interface, text, application, email\n\nDescription automatically generated\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-email-9.png 557w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-email-9-300x214.png 300w\" sizes=\"auto, (max-width: 557px) 100vw, 557px\" \/><\/p>\n<p>\u5728ip address\u4e2d\u6dfb\u52a0\u63a5\u53e3wireGuard\u7684\u63a5\u53e3ip\u5730\u574010.20.30.1\/24<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"406\" height=\"347\" class=\"wp-image-155\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-description-automaticall-8.png\" alt=\"Graphical user interface\n\nDescription automatically generated\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-description-automaticall-8.png 406w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-description-automaticall-8-300x256.png 300w\" sizes=\"auto, (max-width: 406px) 100vw, 406px\" \/><\/p>\n<p>RouterOS\u5b8c\u6210\u4ee5\u4e0a\u914d\u7f6e\u540e\uff0c\u5c06Windows\u7684WireGuard\u7a0b\u5e8f\u5b89\u88c5\u597d\uff0c\u6253\u5f00\u7a0b\u5e8f\uff0c\u5e76\u9009\u62e9\u201c\u65b0\u5efa\u7a7a\u96a7\u9053\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"739\" height=\"684\" class=\"wp-image-156\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-word-descr-7.png\" alt=\"Graphical user interface, application, Word\n\nDescription automatically generated\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-word-descr-7.png 739w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-word-descr-7-300x278.png 300w\" sizes=\"auto, (max-width: 739px) 100vw, 739px\" \/><\/p>\n<p>\u65b0\u5efa\u540e\uff0c\u4f1a\u81ea\u52a8\u751f\u6210windows\u7684\u516c\u94a5<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"835\" height=\"598\" class=\"wp-image-157\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-descr-4.png\" alt=\"Graphical user interface, text, application\n\nDescription automatically generated\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-descr-4.png 835w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-descr-4-300x215.png 300w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-descr-4-768x550.png 768w\" sizes=\"auto, (max-width: 835px) 100vw, 835px\" \/><\/p>\n<p>\u7136\u540e\u5728\u521b\u5efa\u65b0\u96a7\u9053\u5bf9\u8bdd\u6846\u4e2d\uff0c\u5199\u5165\u4ee5\u4e0b\u914d\u7f6e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"607\" height=\"491\" class=\"wp-image-158\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-email-10.png\" alt=\"Graphical user interface, text, application, email\n\nDescription automatically generated\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-email-10.png 607w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-text-application-email-10-300x243.png 300w\" sizes=\"auto, (max-width: 607px) 100vw, 607px\" \/><\/p>\n<p>\u6587\u672c\u914d\u7f6e\u5982\u4e0b<\/p>\n<p><strong>[Interface]<\/strong><\/p>\n<p><strong>PrivateKey<\/strong> = uGXG1V\u2026JhTm4=<\/p>\n<p><strong>Address<\/strong>=10.20.30.2\/24<\/p>\n<p>&nbsp;<\/p>\n<p><strong>[peer]<\/strong><\/p>\n<p><strong>PublicKey<\/strong> = RFvRQW\u2026yYANLGuGiTM=\uff08RouterOS public key\uff09<\/p>\n<p><strong>AllowedIPs<\/strong> = 10.20.30.0\/24<\/p>\n<p><strong>Endpoint<\/strong> = 192.168.88.20:13231<\/p>\n<p><strong>PersistentKeepalive<\/strong> = 30<\/p>\n<p><strong>[interface]\uff1a<\/strong>\u4e3aWindows\u63a5\u53e3\u914d\u7f6e\uff0c\u8fd9\u9664\u4e86\u81ea\u52a8\u751f\u6210\u7684\u79c1\u94a5\uff0c\u9700\u8981\u6dfb\u52a0WireGuard\u63a5\u53e3IP\u5730\u574010.20.30.2\/24\uff0c<\/p>\n<p><strong>[peer]\uff1a<\/strong>\u6dfb\u52a0\u5bf9\u7aef\u7684public key\uff0c\u5e76\u6307\u5b9aendpoint\uff08RouterOS\u7684\u5916\u7f51IP\u5730\u5740\uff09\u4e3a192.168.88.20\u7aef\u53e3\u662f13231\uff0c\u5e76\u6dfb\u52a0\u5141\u8bb8\u901a\u8fc7\u7684IP\u5730\u5740\u6bb5\uff0callowedIPs\u4e3a10.20.30.0\/24\uff0ckeepalive\u4f5c\u7528\u662f\u6bcf\u969430\u79d2\u53d1\u9001\u4e00\u4e2a\u8be2\u95ee\u6570\u636e\u8bf7\u6c42\uff0c\u7528\u4e8enat\u4f1a\u8bdd\u8fde\u63a5\u4fdd\u6301\u3002<\/p>\n<p>\u521b\u5efa\u5b8c\u6210\u540e\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"646\" class=\"wp-image-159\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-description-20.png\" alt=\"Graphical user interface, application\n\nDescription automatically generated\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-description-20.png 797w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-description-20-300x243.png 300w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-description-20-768x622.png 768w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/p>\n<p>RouterOS\u4e5f\u5728WireGuard Peer\u4e2d\u505a\u76f8\u5e94\u7684\u914d\u7f6e\uff0c\u9700\u8981\u6307\u5b9apublic key\uff08\u5bf9\u7aefwindows\u7684\u516c\u94a5\uff09\u548callowed address\uff0c\u65e0\u9700\u6307\u5b9aendpoint\u53c2\u6570<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"516\" height=\"379\" class=\"wp-image-160\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-description-21.png\" alt=\"Graphical user interface, application\n\nDescription automatically generated\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-description-21.png 516w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-description-21-300x220.png 300w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/p>\n<p>\u6dfb\u52a0\u5b8c\u6210\u540e\uff0cRouterOS\u53ea\u9700\u8981\u5c06\u5bf9\u7aef\u7684\u516c\u94a5\u7ed1\u5b9a\uff0c\u5982\u679c\u516c\u94a5\u5339\u914d\uff0c\u4f1a\u628a\u8bf7\u6c42\u7684\u6e90\u5730\u5740\u548c\u7aef\u53e3\u4f5c\u4e3aendpoint<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"540\" height=\"172\" class=\"wp-image-161\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/table-description-automatically-generated-11.png\" alt=\"Table\n\nDescription automatically generated\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/table-description-automatically-generated-11.png 540w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/table-description-automatically-generated-11-300x96.png 300w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><\/p>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u5728windows\u7535\u8111\u70b9\u51fb\u8fde\u63a5\uff0c\u5982\u679c\u8fde\u63a5\u6210\u529f\u540e\uff0c\u72b6\u6001\u4f1a\u663e\u793a\u5df2\u8fde\u63a5<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"827\" height=\"646\" class=\"wp-image-162\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-description-22.png\" alt=\"Graphical user interface, application\n\nDescription automatically generated\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-description-22.png 827w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-description-22-300x234.png 300w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/graphical-user-interface-application-description-22-768x600.png 768w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" \/><\/p>\n<p>\u6700\u540e\u5728windows\u548cRouterOS\u4e0a\u90fd\u8fdb\u884cping\u6d4b\u8bd5<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"805\" height=\"482\" class=\"wp-image-163\" src=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/a-picture-containing-graphical-user-interface-des.png\" alt=\"A picture containing graphical user interface\n\nDescription automatically generated\" srcset=\"https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/a-picture-containing-graphical-user-interface-des.png 805w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/a-picture-containing-graphical-user-interface-des-300x180.png 300w, https:\/\/www.xh86.me\/wp-content\/uploads\/2021\/10\/a-picture-containing-graphical-user-interface-des-768x460.png 768w\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u4e24\u7aef\u96a7\u9053\u7684IP\u5730\u5740\u662f10.20.30.1\u548c10.20.30.2\uff0c\u56e0\u6b64\u9700\u8981\u5728\u914d\u7f6e\u4e2d\u90fd\u5141\u8bb810.20.30.0\/24\u7684\u5730\u5740\u6bb5\u901a\u8fc7\uff0c\u8fd8\u6709\u5176\u4ed6IP\u5730\u5740\u6bb5\uff0c\u5c31\u6dfb\u52a0\u591a\u4e2aIP\u5730\u5740\u6bb5\uff0c\u5982\u679c\u662f\u60f3\u8ba9\u4efb\u610fIP\u901a\u8fc7\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4e3a0.0.0.0\/0\u7684IP\u901a\u8fc7\u3002\u5177\u4f53\u7684\u8bbf\u95ee\u6839\u636e\u4f60\u7684\u8def\u7531\u914d\u7f6e\u51b3\u5b9a\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WireGuard\u6709\u591a\u4e2a\u5e73\u53f0\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u5305\u62ecWindows\u7248\u672c\uff0c\u53ef\u4ee5\u4ece\u5b98\u7f51\u4e0b\u8f7dhttps:\/\/www.wire [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,2],"tags":[],"class_list":["post-151","post","type-post","status-publish","format-standard","hentry","category-mikrotik","category-network"],"_links":{"self":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=151"}],"version-history":[{"count":1,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/151\/revisions"}],"predecessor-version":[{"id":164,"href":"https:\/\/www.xh86.me\/index.php?rest_route=\/wp\/v2\/posts\/151\/revisions\/164"}],"wp:attachment":[{"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xh86.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}