I got myself a BuyVM VPS some time ago. For 15 USD a year you get 128 MB RAM (256 MB Burst), 15 GB HDD space and 500 GB / month.
Since they enabled GRE and have the proper modules in place, you can easily set up a PPTP server. I used the Ubuntu 10.10 images for this:

  1. apt-get install pptpd
  2. open /etc/pptpd.conf and enter the following
1
2
localip 192.168.10.1  
remoteip 192.168.10.101-200

3. echo 1 > /proc/sys/net/ipv4/ip_forward
4. edit /etc/ppp/chap-secrets and add a user (username [tab] pptpd [tab] password [tab] *)
5. set up the iptables rules and replace OUTBOUND_IP_ADDRESS with your server’s IP

1
2
3
4
iptables -A INPUT -p tcp --dport 1723 -j ACCEPT  
iptables -A INPUT -p 47 -j ACCEPT  
iptables -A FORWARD -i ppp+ -o venet0 -j ACCEPT  
iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -j SNAT --to-source OUTBOUND_IP_ADDRESS

6. edit /etc/ppp/pptpd-options and enter these options:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
name pptpd  
refuse-pap  
refuse-chap  
refuse-mschap  
require-mschap-v2  
require-mppe-128  
proxyarp  
lock  
nobsdcomp  
novj  
novjccomp  
nologfd  
ms-dns 8.8.8.8  
ms-dns 8.8.4.4

If you want to make these permanent, edit /etc/sysctl.conf and make sure that “net.ipv4.ip_forward=1” doesn’t have a hash (#) in front of it.
After this, copy the iptables rules from above to /etc/rc.local so they are executed on boot.
This should give you an IP from the US that you can connect to with your tech gadgets :)

Comments