Skip to content

Instantly share code, notes, and snippets.

@alvinl
Created April 21, 2012 20:45

Revisions

  1. alvinl revised this gist Apr 21, 2012. No changes.
  2. alvinl revised this gist Apr 21, 2012. No changes.
  3. alvinl revised this gist Apr 21, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vpn.sh
    Original file line number Diff line number Diff line change
    @@ -13,4 +13,4 @@ sysctl -p
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    clear
    echo Username: vpn Password: pass123
    echo Change this immediately!
    echo Change this in /etc/ppp/chap-secrets
  4. alvinl revised this gist Apr 21, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vpn.sh
    Original file line number Diff line number Diff line change
    @@ -12,5 +12,5 @@ echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf
    sysctl -p
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    clear
    echo done! Username: vpn Password: pass123
    echo Username: vpn Password: pass123
    echo Change this immediately!
  5. alvinl revised this gist Apr 21, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions vpn.sh
    Original file line number Diff line number Diff line change
    @@ -11,5 +11,6 @@ echo "vpn pptpd pass123 *" | tee -a /etc/ppp/chap-secrets
    echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf
    sysctl -p
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    clear
    echo done! Username: vpn Password: pass123
    echo Change this immediately!
  6. alvinl revised this gist Apr 21, 2012. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions vpn.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    #!/bin/bash

    apt-get update
    apt-get install pptpd -y
    echo localip 192.168.240.1 >> /etc/pptpd.conf
    echo remoteip 192.168.240.2-9 >> /etc/pptpd.conf
  7. alvinl revised this gist Apr 21, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vpn.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    #!/bin/bash
    apt-get install pptpd
    apt-get install pptpd -y
    echo localip 192.168.240.1 >> /etc/pptpd.conf
    echo remoteip 192.168.240.2-9 >> /etc/pptpd.conf
    echo ms-dns 8.8.8.8 >> /etc/ppp/pptpd-options
  8. alvinl created this gist Apr 21, 2012.
    13 changes: 13 additions & 0 deletions vpn.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/bin/bash
    apt-get install pptpd
    echo localip 192.168.240.1 >> /etc/pptpd.conf
    echo remoteip 192.168.240.2-9 >> /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 "vpn pptpd pass123 *" | tee -a /etc/ppp/chap-secrets
    /etc/init.d/pptpd restart
    echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf
    sysctl -p
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    echo done! Username: vpn Password: pass123
    echo Change this immediately!