Last active
March 3, 2019 04:07
-
-
Save HenryYang/b4adcbc20c7bcde6e648 to your computer and use it in GitHub Desktop.
Revisions
-
HenryYang revised this gist
Mar 3, 2019 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,9 +25,6 @@ apt install -y iptables-persistent iptables-save > /etc/iptables-rules echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf sysctl -p -
HenryYang revised this gist
Mar 3, 2019 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ #!/bin/bash apt update apt install -y pptpd echo "localip 192.168.0.1" >> /etc/pptpd.conf echo "remoteip 192.168.0.128-255" >> /etc/pptpd.conf @@ -21,7 +21,7 @@ echo "$uname pptpd $upwd 192.168.0.135" >> /etc/ppp/chap-secrets iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE apt install -y iptables-persistent iptables-save > /etc/iptables-rules -
HenryYang created this gist
Feb 17, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ #!/bin/bash apt-get update apt-get install -y pptpd echo "localip 192.168.0.1" >> /etc/pptpd.conf echo "remoteip 192.168.0.128-255" >> /etc/pptpd.conf echo "ms-dns 8.8.8.8" >> /etc/ppp/pptpd-options echo "ms-dns 8.8.4.4" >> /etc/ppp/pptpd-options echo -n "Enter User Name:" read uname echo -n "Enter Password:" read upwd echo "$uname pptpd $upwd 192.168.0.135" >> /etc/ppp/chap-secrets /etc/init.d/pptpd restart iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE apt-get install -y iptables-persistent iptables-save > /etc/iptables-rules pre-up iptables-restore < /etc/iptables-rules echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf sysctl -p