{"id":164700,"date":"2023-08-12T10:32:23","date_gmt":"2023-08-12T02:32:23","guid":{"rendered":"http:\/\/www.idc.net\/help\/164700\/"},"modified":"2023-08-12T10:32:23","modified_gmt":"2023-08-12T02:32:23","slug":"%e9%98%bf%e9%87%8c%e4%ba%91ubuntu16-04%e5%a6%82%e4%bd%95%e6%90%ad%e5%bb%bapptpd%e6%9c%8d%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/164700\/","title":{"rendered":"\u963f\u91cc\u4e91ubuntu16.04\u5982\u4f55\u642d\u5efapptpd\u670d\u52a1"},"content":{"rendered":"<p><span style=\"color: #ff0000\"><strong>\u4e00\u3001\u642d\u5efapptp vpn \u9700\u5f00\u653e1723\u7aef\u53e3\u548cgre\u534f\u8bae<\/strong><\/span><\/p>\n<p>1.\u963f\u91cc\u4e91\u6709\u4e2a\u5b89\u5168\u7ec4\u9700\u8981\u5f00\u653e\u7aef\u53e3\u624d\u80fd\u8bbf\u95ee\uff0c\u9700\u6dfb\u52a0\u65b0\u7684\u5b89\u5168\u7ec4\u89c4\u5219\u3002<\/p>\n<p>\u767b\u9646\u963f\u91cc\u4e91\u670d\u52a1\u5668\u7ba1\u7406\u63a7\u5236\u53f0\uff0c\u6dfb\u52a0\u5b89\u5168\u7ec4\u89c4\u5219 \u5165\/\u51fa\u65b9\u5411\u90fd\u586b\u5199 \u7aef\u53e3\u8303\u56f4\u4e3a1723\/1723 \u5177\u4f53\u5982\u56fe<\/p>\n<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/img.dbs724.com\/wp-content\/uploads\/2023\/02\/1676887018-f53b49942396e91.png\" class=\"aligncenter\"><\/p>\n<p>2.\u540c\u65f6\u670d\u52a1\u5668\u5185\u90e8\u4e5f\u8981\u5f00\u653e1723\u7aef\u53e3 \u8fd9\u4e2a\u5728\u540e\u9762\u8bb2<\/p>\n<\/p>\n<p><span style=\"color: #ff0000\"><strong>\u4e8c\u3001\u5b89\u88c5pptp<\/strong><\/span><\/p>\n<p>\u3000\u3000<code>sudo apt-get install pptpd<\/code><\/p>\n<p><span style=\"color: #ff0000\"><strong>\u4e09\u3001\u914d\u7f6epptp<\/strong><\/span><\/p>\n<p>\u3000\u30001.\u914d\u7f6e\u4e3b\u673aip\u53ca\u8fde\u63a5\u4e3b\u673a\u7684\u8bbe\u5907\u6240\u5206\u914dip\u6c60<\/p>\n<p>\u3000\u3000sudo vim \/etc\/pptpd.conf #\u5982\u56fe\u5c0696~97#\u53bb\u6389<\/p>\n<p style=\"text-align: center\">\u3000\u3000<img decoding=\"async\" src=\"https:\/\/img.dbs724.com\/wp-content\/uploads\/2023\/02\/1676887018-23cd4b402199e7b.png\" class=\"aligncenter\"><\/p>\n<p>\u3000\u30002.\u914d\u7f6edns\u89e3\u6790<\/p>\n<p>\u3000\u3000sudo vim \/etc\/ppp\/pptpd-options #\u53bb\u638958\u300159# \u963f\u91cc\u4e91\u516c\u5171\u7684dns \u4e3a223.6.6.6\u548c223.5.5.5 \u6240\u4ee5\u56fe\u5982\u4e0b<\/p>\n<p style=\"text-align: center\">\u3000\u3000<img decoding=\"async\" src=\"https:\/\/img.dbs724.com\/wp-content\/uploads\/2023\/02\/1676887018-2015442be4e7f34.png\" class=\"aligncenter\"><\/p>\n<p>\u3000\u30003.\u914d\u7f6e\u767b\u9646\u7528\u6237<\/p>\n<p>\u3000\u3000sudo vim \/etc\/ppp\/chap-secrets #\u5728\u672b\u5c3e\u6dfb\u52a0 user\uff08\u7528\u6237\u540d\uff09 pptpd\uff08\u534f\u8bae\uff09 password\uff08\u5bc6\u7801\uff09 ip\u5730\u5740 \u5206\u522b\u7528tab\u9694\u5f00\uff0c\u53ef\u8bbe\u7f6e\u591a\u4e2a<\/p>\n<p style=\"text-align: center\">\u3000\u3000<img decoding=\"async\" src=\"https:\/\/img.dbs724.com\/wp-content\/uploads\/2023\/02\/1676887018-df81e47dcc46201.png\" class=\"aligncenter\"><\/p>\n<p><span style=\"color: #ff0000\"><strong>\u56db\u3001\u5f00\u542fip\u8f6c\u53d1\u529f\u80fd<\/strong><\/span><\/p>\n<p>\u3000\u3000sudo vim \/etc\/sysctl.conf<\/p>\n<p>\u53bb\u6389net.ipv4.ip_forward=1\u7684#\u53f7 \u5927\u81f4\u5728\u7b2c25\u884c<\/p>\n<p>\u3000\u3000\u66f4\u65b0sudo sysctl -p<\/p>\n<p><span style=\"color: #ff0000\"><strong>\u4e94\u3001\u6253\u5f00\u670d\u52a1\u56681723\u7aef\u53e3\uff0c\u5f00\u542fgre\u534f\u8bae<\/strong><\/span><\/p>\n<p>\u3000\u3000\u5b89\u88c5iptable iptable\u662f\u7ba1ip\u548c\u9632\u706b\u5899<\/p>\n<p>\u3000\u3000sudo apt-getinstall iptables<\/p>\n<p>\u3000\u3000sudo iptables -A INPUT -p tcp \u2013dport 1723 -j ACCEPT #\u5f00\u653e1723\u7aef\u53e3<\/p>\n<p>\u3000\u3000sudo iptables -A INPUT -p gre -j ACCEPT\u3000\u3000#\u5f00\u542fgre\u534f\u8bae<\/p>\n<p><span style=\"color: #ff0000\"><strong>\u516d\u3001\u5f00\u542fNAT\u8f6c\u53d1<\/strong><\/span><\/p>\n<p>\u3000\u3000sudo iptables -t nat -A POSTROUTING -s 192.168.0.1\/24 -o ens3 -j MASQUERADE<\/p>\n<p>\u3000\u3000\u5176\u4e2d\uff0c192.168.0.1\/24 \u4e3a\u8bbe\u7f6e\u4e3b\u673aip\u7684\u5b50\u7f51\u63a9\u7801\u3002<\/p>\n<p>\u3000\u3000ens3\u4e3a \u670d\u52a1\u5668\u7f51\u5361\u540d\u79f0\uff0c\u53ef\u901a\u8fc7ifconfig \u67e5\u770b\u3002<\/p>\n<p style=\"text-align: center\">\u3000\u3000<img decoding=\"async\" src=\"https:\/\/img.dbs724.com\/wp-content\/uploads\/2023\/02\/1676887019-b27dc8000620dfb.png\" class=\"aligncenter\"><\/p>\n<p>\u3000\u3000sudo iptables-save \u4fdd\u5b58\u5e76\u751f\u6548<\/p>\n<p><span style=\"color: #ff0000\"><strong>\u4e03\u3001\u91cd\u542fpptpd \u4f7f\u5176\u751f\u6548<\/strong><\/span><\/p>\n<p>\u3000\u3000service pptpd restart<\/p>\n<p><span style=\"background-color: #ffff00\"><strong>\u6ce8\uff1a<\/strong><\/span><\/p>\n<p>1\u3001\u6211\u4e5f\u7528\u4e86sudo ufw allow 1723\/tcp \u547d\u4ee4\u53bb\u5f00\u542f1723\u7aef\u53e3<\/p>\n<p>2\u3001\u767b\u9646vpn\u65f6\uff0c\u670d\u52a1\u5668\u5730\u5740\u4e3a\u5916\u7f51\u5730\u5740 \u7528\u6237\u540d\u548c\u5bc6\u7801\u4e3a\u7b2c\u4e09\u6b65\u4e2d\u914d\u7f6e\u7684\u7528\u6237\u548c\u5bc6\u7801<\/p>\n<p>\u76f8\u5173\u9605\u8bfb\uff1a<\/p>\n<p>\u963f\u91cc\u4e91 ubuntu16.04\u642d\u5efaIPSec\u670d\u52a1<\/p>\n<h3>\u603b\u7ed3<\/h3>\n<p>\u4ee5\u4e0a\u6240\u8ff0\u662f\u5c0f\u7f16\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u7684\u963f\u91cc\u4e91ubuntu16.04\u5982\u4f55\u642d\u5efapptpd\u670d\u52a1\uff0c\u5927\u5bb6\u5982\u6709\u7591\u95ee\u53ef\u4ee5\u7559\u8a00\uff0c\u6216\u8005\u8054\u7cfb\u7ad9\u957f\u3002\u611f\u8c22\u4eb2\u4eec\u652f\u6301\uff01\uff01\uff01<br \/> \u5982\u679c\u4f60\u89c9\u5f97\u672c\u6587\u5bf9\u4f60\u6709\u5e2e\u52a9\uff0c\u6b22\u8fce\u8f6c\u8f7d\uff0c\u70e6\u8bf7\u6ce8\u660e\u51fa\u5904\uff0c\u8c22\u8c22\uff01<\/p>\n<p><a href=\"http:https:\/\/idc.net\/\">\u9999\u6e2f\u670d\u52a1\u5668<\/a>\u9996\u9009\u540e\u6d6a\u4e91\uff0c2H2G\u9996\u670810\u5143\u5f00\u901a\u3002<br \/>\u540e\u6d6a\u4e91\uff08www.IDC.Net\uff09\u63d0\u4f9b\u7b80\u5355\u597d\u7528\uff0c\u4ef7\u683c\u539a\u9053\u7684\u9999\u6e2f\/\u7f8e\u56fd\u4e91\u670d\u52a1\u5668\u548c\u72ec\u7acb\u670d\u52a1\u5668\u3002IDC+ISP+ICP\u8d44\u8d28\u3002ARIN\u548cAPNIC\u4f1a\u5458\u3002\u6210\u719f\u6280\u672f\u56e2\u961f15\u5e74\u884c\u4e1a\u7ecf\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u642d\u5efapptp vpn \u9700\u5f00\u653e1723\u7aef\u53e3\u548cgre\u534f\u8bae 1.\u963f\u91cc\u4e91\u6709\u4e2a\u5b89\u5168\u7ec4\u9700\u8981\u5f00\u653e\u7aef\u53e3\u624d\u80fd\u8bbf\u95ee\uff0c\u9700\u6dfb\u52a0\u65b0\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":164702,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-164700","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/164700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=164700"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/164700\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media\/164702"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=164700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=164700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=164700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}