4

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.

1 Answer 1

10

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 [email protected]

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:

localip 192.168.0.1 
remoteip 192.168.0.2-254

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

ms-dns 8.8.8.8
ms-dns 8.8.4.4

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

user1 pptpd password1 * 
user2 pptpd password2 *

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

net.ipv4.ip_forward=1

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 192.168.0.0/24 ! -d 192.168.0.0/24 -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

Source

This video will help you also

See this also

1
  • 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, 2013 at 16:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .