修改2个文件,重启就可以了
下面2个文件里面添加
widon@widon-F3JR:~$ cat /etc/rc.local
iptables -Fiptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o ppp0 -j MASQUERADE
widon@widon-F3JR:~$ cat /etc/sysctl.conf | grep ip_forward
net.ipv4.ip_forward=1
ok