• How To's
  • Ubuntu
  • How to Setup VPN PPTP Server in Ubuntu Server

    A VPN network (Virtual Private Network) is a secured virtual network that allows to send data between two computers either across Internet or shared network completely safe. In this tutorial we set a type of VPN called PPTP (supported by Microsoft) in our Ubuntu 12.04Lts server edition. The steps are of following reported
    1. Installation of PPTP

    sudo apt-get install pptpd

    2. Edit the configuration file

    sudo gedit /etc/pptpd.conf

    3. Configuration of PPTP
    At the bottom of the file, you will find recommended settings for both localip and remoteip. Uncomment localip and remoteip, then configure your IP address range for remoteip if needed. Where:localip: is the IP address of your server adapter
    remoteip: contains the IP address range allowed for users to use when connecting through VPN to your server.

    localip 192.168.0.1
    remoteip 192.168.0.250-254, 192.168.0.15
    

    When you finish your configuration, save the file and close it.
    4. Set up VPN secrets

     sudo gedit /etc/ppp/chap-secrets

    5. Add users you want to grant access
    add the lines

    # Secrets for authentication using CHAP
    # client server secret IP addresses
    robert pptpd vpn_pwd1 211.30.0.0/14
    richard pptpd vpn_pwd2 212.220.0.0/12
    

    Note: “vpn-pwdX” is the password that the user will use to connect to the VPN network.
    To allow all IP addresses for a user, use this example:

    # Secrets for authentication using CHAP
    # client server secret IP addresses
    richard pptpd password *
    

    at this point restart the service

    sudo /etc/init.d/pptpd restart

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    2 mins