This site is still inaccessible from China, so I decided to get some new hosting with my own dedicated IP. I went with rimuhosting: my own linux VPS at $19/month! Immediately moved all my websites (except this one) from directnic to rimuhosting. I’ll first have to figure out how to do secure IMAP before I move lunesu.com over to the new server.

As you see, I also got PPTP working. Pretty standard really:

sudo apt-get install pptpd

Check the entries at the end of pptpd.conf. Make sure the localip and remoteip entries do not conflict with anything else on the network. localip will be the IP of the ppp0 interface on the server. remoteip is the range from which IPs will be handed out to the connecting clients. (*)

sudo vi etc/pptpd.conf

We should also route DNS through the VPN. Check the current DNS settings first.

cat etc/resolv.conf

Edit the pptpd-options file and enable one or both ms-dns settings, using the IPs from resolv.conf:

sudo vi etc/ppp/pptpd-options

Now it’s time to add some VPN accounts

sudo vi etc/ppp/chap-secrets

One more thing: the server will act as a gateway for the VPN clients and should perform NAT:

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

(You will probably want to put that line in some script so it executes automatically after reboot.) Done! Start or restart pptpd:

sudo etc/init.d/pptpd restart

Enjoy!

(* Serendipity does not support blog entries that contain slash-etc-slash! wtf)