- Create a EC2 instance using
Ubuntu 14.04
. - In
Secure Group Inbound Rules
, add aSSH Rule(TCP, Port 22, 0.0.0.0/0)
and aCustom TCP Rule(TCP, Port 1723, 0.0.0.0/0)
. - Optional: Associate a Elastic IP with the instance.
- SSH into the instance.
sudo apt-get install pptpd
.sudo vim /etc/pptpd.conf
. Uncommentlocalip 192.168.0.1
andremoteip 192.168.0.234-238,192.168.0.245
.sudo vim /etc/ppp/pptpd-options
. Uncommentms-dns
andms-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
sudo vim /etc/ppp/chap-secrets
. Add VPN users in this format<username> pptpd <passwd> *
.sudo vim /etc/sysctl.conf
. Uncommentnet.ipv4.ip_forward=1
.sudo /sbin/sysctl -p
.sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
.sudo vim /etc/rc.local
. Addiptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
beforeexit 0
.sudo /etc/init.d/pptpd restart
.
- Go to
System Preferences > Network
. - Click the
+
button. ChooseVPN
as interface.PPTP
as VPN Type. And enter a name you can understand. ClickCreate
. - Enter your instance's Public IP in
Server Address
. - Enter your
<username>
inAccount Name
. - Click
Authentication Settings
. ChoosePassword
and enter your<password>
. - Click
Advanced
. CheckSend all traffic over VPN connection
. ClickOK
. - Click
Apply
. - Click
Connect
. - Get yourself a cup of coffee and rock on!
- Go to
Settings > General > VPN
. - Touch
Add VPN Configuration...
. - Choose
PPTP
. - Enter any name in
Description
. - Enter your instance's Public IP in
Server
. - Enter your
<username>
inAccount
. - Enter your
<password>
inPassword
. - Turn on
Send All Traffic
. Save
.- Switch on the VPN connection.
- Rock on!