{"id":9,"date":"2001-01-01T10:10:10","date_gmt":"2001-01-01T02:10:10","guid":{"rendered":"http:\/\/www.q25.net\/?p=9"},"modified":"2019-03-28T10:06:27","modified_gmt":"2019-03-28T02:06:27","slug":"about","status":"publish","type":"post","link":"http:\/\/www.q25.net\/?p=9","title":{"rendered":"CentOS\u4e0b\u5b89\u88c5\u914d\u7f6epptpd VPN"},"content":{"rendered":"<p>\u5b89\u88c5PPP<\/p>\n<p>yum -y install ppp<\/p>\n<p>\u5230rpmfind.net\u4e0b\u8f7dpptpd rpm\u5305\u6216\u8005\u5230sf\u4e0b\u8f7d\u6e90\u7801\u5305\u81ea\u5df1\u7f16\u8bd1\uff0c\u61d2\u4eba\u5f53\u7136\u662f\u4e0b\u8f7drpm\u5305\u4e86<\/p>\n<p>http:\/\/sourceforge.net\/projects\/poptop\/files\/<\/p>\n<p>ftp:\/\/rpmfind.net\/linux\/epel\/6\/x86_64\/pptpd-1.4.0-3.el6.x86_64.rpm<\/p>\n<p>rpm -ivh pptpd-1.4.0-3.el6.x86_64.rpm<\/p>\n<p>\u914d\u7f6e\u5f88\u7b80\u5355,\/etc\/pptpd.conf\u91cc\u9762\uff0c\u8bbe\u7f6e\u4e00\u4e0bIP<\/p>\n<p>localip 10.8.0.1<\/p>\n<p>remoteip 10.8.0.2-254<\/p>\n<p>\/etc\/ppp\/chap-secrets \u91cc\u9762\u8bbe\u7f6e\u7528\u6237\u8d26\u6237\uff0c\u683c\u5f0f\u5982\u4e0b<\/p>\n<p>\u7b2c\u4e00\u4e2atest\u662f\u7528\u6237\uff0c\u7b2c\u4e8c\u4e2atest\u662f\u5bc6\u7801 \uff0c*\u8868\u793a\u4efb\u610fip<\/p>\n<p>\u914d\u7f6e\u6587\u4ef6\/etc\/sysctl.conf<br \/>\nvi \/etc\/sysctl.conf<br \/>\n\u4fee\u6539\u4ee5\u4e0b\u5185\u5bb9\u5f00\u542fip\u8f6c\u53d1\uff1a<br \/>\nnet.ipv4.ip_forward = 1<br \/>\n\u4fdd\u5b58\u3001\u9000\u51fa\u540e\u6267\u884c\uff1a<br \/>\nsysctl -p<\/p>\n<p>\u56e0\u4e3a\u6ca1\u6709\u516c\u7f51\u5730\u5740\u5206\u914d\u7ed9\u5ba2\u6237\u7aef\uff0c\u6240\u4ee5\u8981\u4f7f\u7528iptables\u505anat\u8f6c\u53d1\u8ba9\u5ba2\u6237\u7aef\u53ef\u4ee5\u4e0a\u7f51<\/p>\n<p>iptables -A POSTROUTING -t nat -s 10.8.0.1\/24 -o eth0 -j MASQUERADE<\/p>\n<p>\u597d\u4e86\uff0c\u542f\u52a8pptpd\uff0c\u7528\u81ea\u5df1\u7684\u7535\u8111\u65b0\u5efa\u4e00\u4e2avpn\u8fde\u63a5\u8fc7\u53bb\u8bd5\u8bd5\u5427<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5PPP yum -y install&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.q25.net\/index.php?rest_route=\/wp\/v2\/posts\/9"}],"collection":[{"href":"http:\/\/www.q25.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.q25.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.q25.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.q25.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":5,"href":"http:\/\/www.q25.net\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions"}],"predecessor-version":[{"id":96,"href":"http:\/\/www.q25.net\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions\/96"}],"wp:attachment":[{"href":"http:\/\/www.q25.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.q25.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.q25.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}