Skip to content

Instantly share code, notes, and snippets.

@aioutecism
Last active August 28, 2025 08:34
Show Gist options
  • Select an option

  • Save aioutecism/2638bb9eaf9ffc13348c to your computer and use it in GitHub Desktop.

Select an option

Save aioutecism/2638bb9eaf9ffc13348c to your computer and use it in GitHub Desktop.

Revisions

  1. aioutecism revised this gist Apr 20, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -33,7 +33,7 @@ ms-wins 8.8.4.4
    6. Click `Advanced`. Check `Send all traffic over VPN connection`. Click `OK`.
    7. Click `Apply`.
    8. Click `Connect`.
    9. Get yourself a cup of coffee and rock on!
    9. You are good to go.

    # iOS Usage

    @@ -47,4 +47,4 @@ ms-wins 8.8.4.4
    8. Turn on `Send All Traffic`.
    9. `Save`.
    10. Switch on the VPN connection.
    11. Rock on!
    11. You are good to go.
  2. aioutecism revised this gist Apr 20, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -9,12 +9,12 @@
    7. `sudo vim /etc/ppp/pptpd-options`. Uncomment `ms-dns` and `ms-wins`. Change the IP to Google's DNS like this:
    ```
    ms-dns 8.8.8.8
    ms-dns 4.4.4.4
    ms-dns 8.8.4.4
    #...
    ms-wins 8.8.8.8
    ms-wins 4.4.4.4
    ms-wins 8.8.4.4
    ```
    8. `sudo vim /etc/ppp/chap-secrets`. Add VPN users in this format `<username> pptpd <passwd> *`.
    9. `sudo vim /etc/sysctl.conf`. Uncomment `net.ipv4.ip_forward=1`.
  3. aioutecism revised this gist Feb 17, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Set up a VPN Server on AWS
    # Set up a VPN Server (PPTP) on AWS

    1. Create a EC2 instance using `Ubuntu 14.04`.
    2. In `Secure Group Inbound Rules`, add a `SSH Rule(TCP, Port 22, 0.0.0.0/0)` and a `Custom TCP Rule(TCP, Port 1723, 0.0.0.0/0)`.
  4. aioutecism revised this gist Feb 17, 2015. No changes.
  5. aioutecism revised this gist Feb 15, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Set up an VPN Server on AWS
    # Set up a VPN Server on AWS

    1. Create a EC2 instance using `Ubuntu 14.04`.
    2. In `Secure Group Inbound Rules`, add a `SSH Rule(TCP, Port 22, 0.0.0.0/0)` and a `Custom TCP Rule(TCP, Port 1723, 0.0.0.0/0)`.
  6. aioutecism revised this gist Feb 15, 2015. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    # Set up an VPN Server on AWS

    1. Create a EC2 instance using "Ubuntu 14.04".
    2. In secure group inbound rules, add a SSH Rule(TCP, Port 22, 0.0.0.0/0) and a Custom TCP Rule(TCP, Port 1723, 0.0.0.0/0).
    1. Create a EC2 instance using `Ubuntu 14.04`.
    2. In `Secure Group Inbound Rules`, add a `SSH Rule(TCP, Port 22, 0.0.0.0/0)` and a `Custom TCP Rule(TCP, Port 1723, 0.0.0.0/0)`.
    3. Optional: Associate a Elastic IP with the instance.
    4. SSH into the instance.
    5. `sudo apt-get install pptpd`
    5. `sudo apt-get install pptpd`.
    6. `sudo vim /etc/pptpd.conf`. Uncomment `localip 192.168.0.1` and `remoteip 192.168.0.234-238,192.168.0.245`.
    7. `sudo vim /etc/ppp/pptpd-options`. Uncomment `ms-dns` and `ms-wins`. Change the IP to Google's DNS like this:
    ```
    @@ -18,10 +18,10 @@ ms-wins 4.4.4.4
    ```
    8. `sudo vim /etc/ppp/chap-secrets`. Add VPN users in this format `<username> pptpd <passwd> *`.
    9. `sudo vim /etc/sysctl.conf`. Uncomment `net.ipv4.ip_forward=1`.
    10. `sudo /sbin/sysctl -p`
    11. `sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE`
    10. `sudo /sbin/sysctl -p`.
    11. `sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE`.
    12. `sudo vim /etc/rc.local`. Add `iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE` before `exit 0`.
    13. `sudo /etc/init.d/pptpd restart`
    13. `sudo /etc/init.d/pptpd restart`.

    # OSX Usage

    @@ -45,6 +45,6 @@ ms-wins 4.4.4.4
    6. Enter your `<username>` in `Account`.
    7. Enter your `<password>` in `Password`.
    8. Turn on `Send All Traffic`.
    9. `Save`
    9. `Save`.
    10. Switch on the VPN connection.
    11. Rock on!
  7. aioutecism created this gist Feb 15, 2015.
    50 changes: 50 additions & 0 deletions gistfile1.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,50 @@
    # Set up an VPN Server on AWS

    1. Create a EC2 instance using "Ubuntu 14.04".
    2. In secure group inbound rules, add a SSH Rule(TCP, Port 22, 0.0.0.0/0) and a Custom TCP Rule(TCP, Port 1723, 0.0.0.0/0).
    3. Optional: Associate a Elastic IP with the instance.
    4. SSH into the instance.
    5. `sudo apt-get install pptpd`
    6. `sudo vim /etc/pptpd.conf`. Uncomment `localip 192.168.0.1` and `remoteip 192.168.0.234-238,192.168.0.245`.
    7. `sudo vim /etc/ppp/pptpd-options`. Uncomment `ms-dns` and `ms-wins`. Change the IP to Google's DNS like this:
    ```
    ms-dns 8.8.8.8
    ms-dns 4.4.4.4
    #...
    ms-wins 8.8.8.8
    ms-wins 4.4.4.4
    ```
    8. `sudo vim /etc/ppp/chap-secrets`. Add VPN users in this format `<username> pptpd <passwd> *`.
    9. `sudo vim /etc/sysctl.conf`. Uncomment `net.ipv4.ip_forward=1`.
    10. `sudo /sbin/sysctl -p`
    11. `sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE`
    12. `sudo vim /etc/rc.local`. Add `iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE` before `exit 0`.
    13. `sudo /etc/init.d/pptpd restart`

    # OSX Usage

    1. Go to `System Preferences > Network`.
    2. Click the `+` button. Choose `VPN` as interface. `PPTP` as VPN Type. And enter a name you can understand. Click `Create`.
    3. Enter your instance's Public IP in `Server Address`.
    4. Enter your `<username>` in `Account Name`.
    5. Click `Authentication Settings`. Choose `Password` and enter your `<password>`.
    6. Click `Advanced`. Check `Send all traffic over VPN connection`. Click `OK`.
    7. Click `Apply`.
    8. Click `Connect`.
    9. Get yourself a cup of coffee and rock on!

    # iOS Usage

    1. Go to `Settings > General > VPN`.
    2. Touch `Add VPN Configuration...`.
    3. Choose `PPTP`.
    4. Enter any name in `Description`.
    5. Enter your instance's Public IP in `Server`.
    6. Enter your `<username>` in `Account`.
    7. Enter your `<password>` in `Password`.
    8. Turn on `Send All Traffic`.
    9. `Save`
    10. Switch on the VPN connection.
    11. Rock on!