Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Ubuntu (Debian) VPS in USA, NOW want to make up VPN service on it. Can you help me to handle it, please.

  • Which program surplussed me for.
  • What about Socks!. [I need it too]
  • How can I install it.
  • Which account manager is better then for accounting.
share|improve this question
up vote 8 down vote accepted

For this instructions we assume your virtual server has IP: 83.170.XXX.XXX (replace with the real IP everywhere).

Then login via SSH as root

ssh root@83.170.XXX.XXX

Following these commands and instructions, update Ubuntu:

apt-get update 
apt-get upgrade 
apt-get install pptpd

Edit the file /etc/pptpd.conf and add:


Insert the name servers in /etc/ppp/pptpd-options:


Create two test users in /etc/ppp/chap-secrets

user1 pptpd password1 * 
user2 pptpd password2 *

Setup routing for VPN server in /etc/sysctl.conf:


Now edit /etc/rc.local (insert before exit 0 and replace 83.XXX.XXX.XXX with your VPS IP number):

iptables -t nat -A POSTROUTING -s ! -d -j SNAT --to-source 83.XXX.XXX.XXX

Restart and we are done.

shutdown -r now

Now you can log in with VPN over PPTP with either of the credentials you created before:

  • user1/password1
  • user2/password2


This video will help you also

See this also

share|improve this answer
I have tried using Windows PPTP connection to my VPS server after following those procedures. Windows kept giving me this error: Error 619: A connection to the remote computer could not be established, so the port used for the connection was closed. – owl Nov 8 '13 at 16:27

protected by Community Aug 16 '13 at 7:32

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.