{"id":441,"date":"2015-07-10T15:42:39","date_gmt":"2015-07-10T15:42:39","guid":{"rendered":"http:\/\/15d4e891d784977cacbfcbb00c48f133"},"modified":"2017-10-18T17:55:15","modified_gmt":"2017-10-18T09:55:15","slug":"pptp","status":"publish","type":"post","link":"https:\/\/www.xiaobo.li\/notes\/archives\/441","title":{"rendered":"pptp"},"content":{"rendered":"<p>1\u3001\u68c0\u67e5\u670d\u52a1\u5668\u662f\u5426\u6709\u5fc5\u8981\u7684\u652f\u6301\u3002\u5982\u679c\u68c0\u67e5\u7ed3\u679c\u6ca1\u6709\u8fd9\u4e9b\u652f\u6301\u7684\u8bdd\uff0c\u662f\u4e0d\u80fd\u5b89\u88c5pptp\u7684\u3002\u6267\u884c\u6307\u4ee4\uff1a<br \/>\n#modprobe ppp-compress-18 &amp;&amp; echo ok\uff08\u7528\u6a21\u5757\u65b9\u5f0f\u652f\u6301MPPE\u52a0\u5bc6\u6a21\u5f0f\u6d4f\u89c8\uff0c\u5982\u679c\u5185\u6838\u652f\u6301\u68c0\u6d4b\u4e0d\u5230\u3002\uff09<br \/>\n\u8fd9\u6761\u6267\u884c\u6267\u884c\u540e\uff0c\u663e\u793a\u201cok\u201d\u5219\u8868\u660e\u901a\u8fc7\u3002<\/p>\n<p>2\u3001\u5b89\u88c5ppp\u548ciptables\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5b8c\u6574\u7684CentOS\u662f\u5e26\u6709\u8fd9\u4e24\u4e2a\u7ec4\u4ef6\u7684\uff0c\u4f46\u662f\u7cbe\u7b80\u7248\u7684\u7cfb\u7edf\u53ef\u80fd\u6ca1\u6709\u3002\u6211\u4eec\u8f93\u5165\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u786e\u8ba4\uff0c\u5982\u679c\u6ca1\u6709\u5219\u8fdb\u884c\u5b89\u88c5\uff0c\u6709\u7684\u8bdd\u7cfb\u7edf\u4e0d\u4f1a\u505a\u4efb\u4f55\u52a8\u4f5c\uff1a<br \/>\n#yum install -y iptables<\/p>\n<p>3\u3001\u5b89\u88c5pptp\u3002\u8fd9\u4e2a\u8f6f\u4ef6\u5728yum\u6e90\u91cc\u662f\u6ca1\u6709\u7684\uff0c\u6211\u4eec\u9700\u8981\u624b\u52a8\u4e0b\u8f7d\u3002<br \/>\n\u52a0\u5165yum\u6e90\uff1a<br \/>\n#rpm -Uvh <a href=\"http:\/\/poptop.sourceforge.net\/yum\/stable\/rhel6\/pptp-release-current.noarch.rpm\">http:\/\/poptop.sourceforge.net\/yum\/stable\/rhel6\/pptp-release-current.noarch.rpm<\/a><br \/>\n#yum install\u00a0 -y pptpd<\/p>\n<p>4\u3001\u914d\u7f6epptp\u3002\u9996\u5148\u6211\u4eec\u8981\u7f16\u8f91\/etc\/pptpd.conf\u6587\u4ef6\uff1a<br \/>\n#vim \/etc\/pptpd.conf<\/p>\n<p>localip 192.168.11.1<br \/>\nremoteip 192.168.11.2-102\u00a0 \uff08\u6700\u5927\u9650\u5236100\u4e2a\u8fde\u63a5\uff09<br \/>\n\u5c06\u524d\u9762\u7684\u201c#\u201d\u6ce8\u91ca\u7b26\u53bb\u6389\uff0c\u66f4\u6539\u4e3a\u4f60\u671f\u671b\u7684IP\u6bb5\u503c\u3002localip\u8868\u793a\u670d\u52a1\u5668\u7684IP\uff0cremoteip\u8868\u793a\u5206\u914d\u7ed9\u5ba2\u6237\u7aef\u7684IP\u5730\u5740\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4e3a\u533a\u95f4\u3002\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528pptp\u9ed8\u8ba4\u7684\u914d\u7f6e\uff1a<\/p>\n<p>\u518d\u7f16\u8f91\/etc\/ppp\/options.pptpd\u6587\u4ef6\uff0c\u4e3aVPN\u6dfb\u52a0Google DNS\uff1a<br \/>\n#vim \/etc\/ppp\/options.pptpd<br \/>\n\u5728\u672b\u5c3e\u6dfb\u52a0\u4e0b\u9762\u4e24\u884c\uff1a<br \/>\nms-dns 8.8.8.8<br \/>\nms-dns 8.8.4.4<\/p>\n<p>\u6ce8\u610f\uff1a\u6700\u597d\u6253\u5f00\u8fd9\u4e2a\u6587\u4ef6\u91cc\u7684debug\u9009\u9879\uff08\u53bb\u6389debug\u524d\u9762\u7684\u201c#\u201d\uff09\uff0c\u4ee5\u65b9\u4fbf\u6211\u4eec\u5728\u51fa\u9519\u7684\u67e5\u770b\u65e5\u5fd7\u6392\u9519\u3002\u9519\u8bef\u65e5\u5fd7\u5728\/var\/log\/messages\u91cc\uff0c\u7528\u547d\u4ee4\uff1acat \/var\/log\/messages | grep pptpd \u67e5\u770b\u6709\u5173PPTP\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/p>\n<p>5\u3001\u8bbe\u7f6epptp VPN\u8d26\u53f7\u5bc6\u7801\u3002\u6211\u4eec\u9700\u8981\u7f16\u8f91\/etc\/ppp\/chap-secrets\u8fd9\u4e2a\u6587\u4ef6\uff1a<br \/>\n#vim \/etc\/ppp\/chap-secrets<br \/>\n\u5728\u8fd9\u4e2a\u6587\u4ef6\u91cc\u9762\uff0c\u6309\u7167\u201c\u7528\u6237\u540d pptpd \u5bc6\u7801 *\u201d\u7684\u5f62\u5f0f\u7f16\u5199\uff0c\u4e00\u884c\u4e00\u4e2a\u8d26\u53f7\u548c\u5bc6\u7801\u3002\u6bd4\u5982\u6dfb\u52a0\u7528\u6237\u540d\u4e3atest\uff0c\u5bc6\u7801\u4e3a1234\u7684\u7528\u6237\uff0c\u5219\u7f16\u8f91\u5982\u4e0b\u5185\u5bb9\uff1a<br \/>\ntest pptpd 1234 *<\/p>\n<p>6\u3001\u4fee\u6539\u5185\u6838\u8bbe\u7f6e\uff0c\u4f7f\u5176\u652f\u6301\u8f6c\u53d1\u3002\u7f16\u8f91\/etc\/sysctl.conf\u6587\u4ef6\uff1a<br \/>\n#vim \/etc\/sysctl.conf<br \/>\n\u5c06\u201cnet.ipv4.ip_forward\u201d\u6539\u4e3a1\uff0c\u53d8\u6210\u4e0b\u9762\u7684\u5f62\u5f0f\uff1a<br \/>\nnet.ipv4.ip_forward=1<br \/>\n\u4fdd\u5b58\u9000\u51fa\uff0c\u5e76\u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u751f\u6548\u5b83\uff1a<br \/>\n#sysctl -p<\/p>\n<p>7\u3001\u6dfb\u52a0iptables\u8f6c\u53d1\u89c4\u5219\u3002\u7ecf\u8fc7\u524d\u9762\u76846\u4e2a\u6b65\u9aa4\uff0c\u6211\u4eec\u7684VPN\u5df2\u7ecf\u53ef\u4ee5\u62e8\u53f7\u4e86\uff0c\u4f46\u662f\u8fd8\u4e0d\u80fd\u8bbf\u95ee\u4efb\u4f55\u7f51\u9875\u3002\u6700\u540e\u4e00\u6b65\u5c31\u662f\u6dfb\u52a0iptables\u8f6c\u53d1\u89c4\u5219\u4e86\uff0c\u8f93\u5165\u4e0b\u9762\u7684\u6307\u4ee4\uff1a<br \/>\n\u4e24\u79cd\u4fee\u6539\u65b9\u6cd5\uff1a\u547d\u4ee4\u884c\u6216\u4fee\u6539\/etc\/sysconf\/iptables \u6587\u4ef6<br \/>\niptables -t nat -A POSTROUTING -o eth0 -s 192.168.11.0\/24 -j MASQUERADE<\/p>\n<p>iptables -L -t nat \u53ef\u4ee5\u770b\u5230\uff1a<br \/>\nChain PREROUTING (policy ACCEPT)<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0 prot opt source\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 destination<br \/>\nChain POSTROUTING (policy ACCEPT)<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0 prot opt source\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 destination<br \/>\nMASQUERADE\u00a0 all\u00a0 --\u00a0 192.168.11.0\/24\u00a0\u00a0\u00a0\u00a0\u00a0 anywhere<br \/>\nChain OUTPUT (policy ACCEPT)<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0 prot opt source\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 destination<\/p>\n<p>\u5728\/etc\/sysconf\/iptables \u6587\u4ef6 \u5141\u8bb8ping<br \/>\n-A RH-Firewall-1-INPUT -s 192.168.11.0\/255.255.255.0 -p icmp -m icmp --icmp-type 8 -j ACCEPT<br \/>\nservice iptables save\u00a0 \u4fdd\u5b58<br \/>\nservice iptables restart \u91cd\u542f<\/p>\n<p>8.<br \/>\n\u8bbe\u7f6e\u5f00\u673a\u81ea\u52a8\u8fd0\u884c\u670d\u52a1\u3002\u6211\u4eec\u6700\u540e\u4e00\u6b65\u662f\u5c06pptp\u548ciptables\u8bbe\u7f6e\u4e3a\u5f00\u673a\u81ea\u52a8\u8fd0\u884c\uff0c\u8fd9\u6837\u5c31\u4e0d\u9700\u8981\u6bcf\u6b21\u91cd\u542f\u670d\u52a1\u5668\u540e\u624b\u52a8\u542f\u52a8\u670d\u52a1\u4e86\u3002\u5f53\u7136\u4f60\u4e0d\u9700\u8981\u81ea\u52a8\u542f\u52a8\u670d\u52a1\u7684\u8bdd\u53ef\u4ee5\u5ffd\u7565\u8fd9\u4e00\u6b65\u3002\u8f93\u5165\u6307\u4ee4\uff1a<br \/>\n#chkconfig pptpd on<br \/>\n#chkconfig iptables on<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u9650\u5236pptp vpn\u7528\u6237\u5355\u4e2a\u8fde\u63a5\u7684\u7b80\u5355\u65b9\u6cd5<\/strong><\/p>\n<p>\u5728\/etc\/ppp\u6587\u4ef6\u5939\u4e0b\u9762\u5efa\u7acb\u4e00\u4e2a\u540d\u4e3aauth-up\u7684\u6587\u4ef6\u3002\u5728\u91cc\u9762\u5199\u5165\u5982\u4e0b\u5185\u5bb9\u5373\u53ef\uff1a<\/p>\n<p>#!\/bin\/sh<br \/>\n# get the username\/ppp line number from the parameters<br \/>\nREALDEVICE=$1<br \/>\nUSER=$2<br \/>\n# create the directory to keep pid files per user<br \/>\nmkdir -p \/var\/run\/pptpd-users<br \/>\n# if there is a session already for this user, terminate the old one<br \/>\nif [ -f \/var\/run\/pptpd-users\/$USER ]; then<br \/>\nkill -HUP `cat \/var\/run\/pptpd-users\/$USER`<br \/>\nfi<br \/>\n# copy the pid file of current user to \/var\/run\/pptpd-users<br \/>\ncp \"\/var\/run\/$REALDEVICE.pid\" \/var\/run\/pptpd-users\/$USER<\/p>\n<p>\u6765\u6e90:http:\/\/vastars.info\/linux\/pptp-vpn.html<\/p>\n<p>&nbsp;<\/p>\n<p><strong>VPN \u67b6\u8bbe\u4e2d\u4e00\u4e9b\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6cd5\uff08pptpd\uff09<\/strong><\/p>\n<div class=\"blog-content content-generic-body\">\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">1. windows 10 \u4e0b\u670d\u52a1\u5668\u63a8\u9001DNS\u65e0\u6548<br \/>\n<\/span><\/p>\n<p>\u63a7\u5236\u9762\u677f &gt; \u7f51\u7edc\u4e0e\u5171\u4eab &gt; VPN\u6240\u5c5e\u9002\u914d\u5668 &gt; \u5c5e\u6027 &gt; IPv4 &gt; \u9ad8\u7ea7 &gt; \u53d6\u6d88\u81ea\u52a8\u8dc3\u70b9\u5e76\u8bbe\u7f6e\u503c\u4e3a 15<\/p>\n<p>IPv6 \u540c\u4e0a<\/p>\n<p>Control Panel &gt; Network and Sharing Center &gt; Change adapter settings &gt; Right click your Ethernet or Wifi adapter &gt; Properties &gt; double click IPv4 &gt; Advanced &gt; Uncheck Automatic Metric &gt; Enter 15 for interface metric &gt; OK &gt; OK.<\/p>\n<p>On that same Properties page, double click IPv6 &gt; Advanced &gt; Uncheck Automatic Metric &gt; Enter 15 for interface metric &gt; OK &gt; OK.<br \/>\n<span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\"><\/p>\n<p>2.VPN\u53ef\u4ee5\u8fde\u63a5\u6210\u529f\uff0c\u4f46\u4e0d\u80fd\u6b63\u5e38\u4e0a\u7f51\uff0cmessages\u4e2d\u8bb0\u5f55\u5982\u4e0b\uff1a<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0Cannot determine ethernet address for proxy ARP<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">\u00a0 \u00a0\u8be5\u95ee\u9898\u4e3b\u8981\u51fa\u5728\u6ca1\u6709\u76f8\u5173\u7684\u8f6c\u53d1\u89c4\u5219\u3002\u9700\u8981\u8fdb\u884c\u5982\u4e0b\u914d\u7f6e\uff1a<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">\u00a0 \u00a0<\/span><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">a.\u6253\u5f00\u914d\u7f6e\u6587\u4ef6\/etc\/sysctl.conf\uff0c\u4fee\u6539\u914d\u7f6e\u9879net.ipv4.ip_forward\u4e3a1\uff1a<\/span><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\"> \u00a0 \u00a0<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\"># Controls IP packet forwarding<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">net.ipv4.ip_forward = 1<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">\u00a0 \u00a0 \u00a0 \u00a0\u8be5\u914d\u7f6e\u9879\u7528\u4e8e\u5141\u8bb8ip\u8f6c\u53d1\u3002<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">\u00a0 \u00a0b.\u8fd8\u9700\u5728iptables\u4e2d\u52a0\u5165NAT\u8f6c\u6362\uff1a<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">\u00a0 \u00a0 \u00a0 \u00a0iptables -t nat -A POSTROUTING -s 192.168.0.0\/255.255.255.0 -j SNAT --to-source 192.168.0.88<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">\u00a0 \u00a0 \u00a0 \u00a0\u5176\u4e2d192.168.0.0\/255.255.255.0\u4e3aVPN\u7684\u5185\u90e8\u7f51\u7edc\uff0c192.168.0.88\u5f53\u7136\u5c31\u662f\u670d\u52a1\u5668\u7684\u5730\u5740\u4e86\u3002<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">3. \u5982<\/span><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\"><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">sysctl -p<\/span>\u9047<br \/>\n<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">error: \"net.bridge.bridge-nf-call-ip6tables\" is an unknown key<br \/>\nerror: \"net.bridge.bridge-nf-call-iptables\" is an unknown key<br \/>\n<\/span><\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">error: \"net.bridge.bridge-nf-call-arptables\" is an unknown key<\/span><\/p>\n<p>\u8c03\u7528\u5e76\u91cd\u8bd5pptpd<\/p>\n<p><span style=\"font-family: \u5fae\u8f6f\u96c5\u9ed1,microsoft yahei; font-size: 14px;\">modprobe bridge<br \/>\nlsmod|grep bridge<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Windows7 619\u4e00\u4e9b\u53c2\u8003:<\/strong><\/p>\n<p>http:\/\/www.wanghailin.cn\/linux-pptpd-619-internet\/<\/p>\n<p>GRE: read(fd=6,buffer=b77c8480,len=8196) from PTY failed:<\/p>\n<p>Changing \/etc\/ppp\/pptpd-options to the following options worked for me:<\/p>\n<p>refuse-pap<br \/>\nrefuse-chap<br \/>\nrefuse-mschap<br \/>\n#require-chap<br \/>\n#require-mschap<br \/>\n#require-mschap-v2<br \/>\n#require-mppe-128<br \/>\nmppe-stateful<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><b>CentOS 7 \u53c2\u8003:<\/b><\/p>\n<p>http:\/\/www.wanghailin.cn\/centos-7-vpn\/<\/p>\n<p>&nbsp;<\/p>\n<p><b>\u4e00\u4e9bMTU\u53c2\u8003\uff1a<\/b><\/p>\n<p>Ethernet MinSize = 512bit = 64 Byte<br \/>\nEthernet MaxSize = 1518 Byte<br \/>\nso Ethernet IP MTU = 1518 \u2013 18 ( 6 SRCMAC+ 6 DSTMAC+ 2 TYPE+ 4 CRC) = 1500 B<br \/>\nso Ethernet IP TCP MSS = 1500 \u2013 40 ( 20 IP_HEADER + 20 TCP_HEADER) = 1460 B<br \/>\nso Ethernet IP UDP MTU\/MRU = 1500 \u2013 28 ( 20 IP_HEADER + 8 UDP_HEADER ) = 1472 B<br \/>\nso PPPoE MTU\/MRU = 1500 \u2013 8 ( 6 PPPoE_SESSION + 2 PPP_HEADER ) = 1492 B<br \/>\nso TCP over PPPoE MSS = 1492 ( PPPoE MTU\/MRU ) \u2013 40 ( 20 IP_HEADER + 20 TCP_HEADER) = 1452<br \/>\nso PPTP MTU\/MRU = 1500 \u2013 56 ( 20 IP_HEADER + 20 TCP_HEADER + 12 GRE_HEADER + 4 PPP_HEADER ) = 1444 B<br \/>\nso TCP over PPTP MSS = 1444 ( PPTP MTU\/MRU ) \u2013 40 ( 20 IP_HEADER + 20 TCP_HEADER) = 1404<br \/>\nso L2TP MTU\/MRU = 1500 \u2013 40 ( 20 IP_HEADER +8 UDP_HEADER + 8 L2TP_HEADER + 4 PPP_HEADER ) = 1460 B<br \/>\nso TCP over L2TP MSS = 1460 ( L2TP MTU\/MRU ) \u2013 40 ( 20 IP_HEADER + 20 TCP_HEADER) = 1420 B<\/p>\n<p>so<br \/>\nPPTP over PPPoE MTU\/MRU = 1492 ( PPPoE MTU\/MRU ) \u2013 56 ( 20 IP_HEADER +<br \/>\n20 TCP_HEADER + 12 GRE_HEADER + 4 PPP_HEADER ) = 1436 B<br \/>\nso PPTP over PPTP MTU\/MRU = 1444 ( PPTP MTU\/MRU ) \u2013 56 ( 20 IP_HEADER + 20 TCP_HEADER + 12 GRE_HEADER + 4 PPP_HEADER ) = 1388 B<br \/>\nso PPTP over L2TP MTU\/MRU = 1460 ( L2TP MTU\/MRU ) \u2013 56 ( 20 IP_HEADER + 20 TCP_HEADER + 12 GRE_HEADER + 4 PPP_HEADER ) = 1404 B<br \/>\nso L2TP over PPPoE MTU\/MRU = 1492 ( PPPoE MTU\/MRU ) \u2013 40 ( 20 IP_HEADER +8 UDP_HEADER + 8 L2TP_HEADER + 4 PPP_HEADER ) = 1452 B<br \/>\nso L2TP over PPTP MTU\/MRU = 1444 ( PPTP MTU\/MRU ) \u2013 40 ( 20 IP_HEADER +8 UDP_HEADER + 8 L2TP_HEADER + 4 PPP_HEADER ) = 1404 B<br \/>\nso L2TP over L2TP MTU\/MRU = 1460 ( L2TP MTU\/MRU ) \u2013 40 ( 20 IP_HEADER +8 UDP_HEADER + 8 L2TP_HEADER + 4 PPP_HEADER ) = 1420 B<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u68c0\u67e5\u670d\u52a1\u5668\u662f\u5426\u6709\u5fc5\u8981\u7684\u652f\u6301\u3002\u5982\u679c\u68c0\u67e5\u7ed3\u679c\u6ca1\u6709\u8fd9\u4e9b\u652f\u6301\u7684\u8bdd\uff0c\u662f\u4e0d\u80fd\u5b89\u88c5pptp\u7684\u3002\u6267\u884c\u6307\u4ee4\uff1a<br \/>\n#modprobe ppp-compress-18 &amp;&amp; echo ok\uff08\u7528\u6a21\u5757\u65b9\u5f0f\u652f\u6301MPPE\u52a0\u5bc6\u6a21\u5f0f\u6d4f\u89c8\uff0c\u5982\u679c\u5185\u6838\u652f\u6301\u68c0\u6d4b\u4e0d\u5230\u3002\uff09<br \/>\n\u8fd9\u6761\u6267\u884c\u6267\u884c\u540e\uff0c\u663e\u793a\u201cok\u201d\u5219\u8868\u660e\u901a\u8fc7\u3002<\/p>\n<p>2\u3001\u5b89\u88c5ppp\u548ciptables\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5b8c\u6574\u7684CentOS\u662f\u5e26\u6709\u8fd9\u4e24\u4e2a\u7ec4\u4ef6\u7684\uff0c\u4f46\u662f\u7cbe\u7b80\u7248\u7684\u7cfb\u7edf\u53ef\u80fd\u6ca1\u6709\u3002\u6211\u4eec\u8f93\u5165\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u786e\u8ba4\uff0c\u5982\u679c\u6ca1\u6709\u5219\u8fdb\u884c\u5b89\u88c5\uff0c\u6709\u7684\u8bdd\u7cfb\u7edf\u4e0d\u4f1a\u505a\u4efb\u4f55\u52a8\u4f5c\uff1a<br \/>\n#yum install -y iptables<br \/>\n&nbsp;<br \/>\n3\u3001\u5b89\u88c5pptp\u3002\u8fd9\u4e2a\u8f6f\u4ef6\u5728yum\u6e90\u91cc\u662f\u6ca1\u6709\u7684\uff0c\u6211\u4eec\u9700...<\/p>\n<p> <a href=\"https:\/\/www.xiaobo.li\/notes\/archives\/441\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[287],"tags":[218,112],"class_list":["post-441","post","type-post","status-publish","format-standard","hentry","category-linux","tag-pptp","tag-vpn"],"_links":{"self":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/comments?post=441"}],"version-history":[{"count":0,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/441\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/media?parent=441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/categories?post=441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/tags?post=441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}