Ubuntu 12.04安装PPTP

本文发布时间: 2019-Mar-21
1、安装软件sudo apt-get install pptpd ufw2、编辑/etc/ppp/pptpd-options找到refuse-paprefuse-chaprefuse-mschap注释掉这三行,即在前面加#3、接着同样的文件,添加DNSms-dns 8.8.8.8ms-dns 8.8.4.44、编辑/etc/pptpd.conf增加或修改:localip 10.99.99.99remoteip 10.99.99.100-1995、编辑/etc/ppp/chap-secrets添加用户和密码,格式为:[Username] [Service] [Password] [Allowed IP Address]如:sampleusername pptpd samplepassword *6、重启pptpdsudo /etc/init.d/pptpd restart7、编辑/etc/sysctl.conf增加:net.ipv4.ip_forward=1立即生效:sudo sysctl -p8、编辑/etc/default/ufw把所有的默认策略更改为ACCEPT:DEFAULT_FORWARD_POLICY由DROP更改为ACCEPTDEFAULT_INPUT_POLICY由DROP更改为ACCEPT9、编辑/etc/ufw/before.rules增加:# NAT table rules*nat:POSTROUTING ACCEPT [0:0]# Allow forward traffic to eth0-A POSTROUTING -s 10.99.99.0/24 -o eth0 -j MASQUERADE# Process the NAT table rulesCOMMIT10、启动ufwsudo ufw enable11、使用客户端进行测试如windows7,打开控制面板->网络和internet->网络和共享中心同,点击“设置新的连接和网络”,选择连接到工作区,接下来就按提示操作就好。


(以上内容不代表本站观点。)
---------------------------------
本网站以及域名有仲裁协议。
本網站以及域名有仲裁協議。

2024-Mar-04 02:08pm
栏目列表