Wednesday, December 20, 2017

Setup VPN PPTP on Ubuntu Server

  No comments
Because of the need for public static IP Address usage for connection to the japanese and ISP servers I use using dynamic IP. I am trying to create a vpn server digital ocean and get static ip for registering on japanese server whitelist. the use of this vpn can also be used to open sites that are blocked by isp. i will give a tutorial How to setup PPTP VPN on ubuntu server.

  1. Login root SSH to your server and install some package
    $ apt-get install ppp pptpd iptables
  2. configuration of PPTP IP ranges in server.
    $ vim /etc/pptpd.conf
  3. Then remove the '#' in the configuration file on the following line:
    #localip 192.168.0.1
    #remoteip 192.168.0.234-238,192.168.0.245
    to
    localip 192.168.0.1
    remoteip 192.168.0.234-238,192.168.0.245
  4. Configuration DNS Server
    $ vim /etc/ppp/pptpd-options
    find 'ms-dns' and change to
    ms-dns 8.8.8.8
    ms-dns 8.8.4.4
  5. Create Account
    $ vim /etc/ppp/chap-secrets
    add new line and create account like this
    # client    server  secret      IP addresses
    izor        pptpd   asd1234     *
  6. Configure NAT for PPTP connections, otherwise we can not connect to any of these servers
    $ vim /etc/rc.local
    add before line exit 0
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE && iptables-save
  7. Aktifkan IPv4 forwarding
    $ vim /etc/sysctl.conf
    uncomment or remove the #
    net.ipv4.ip_forward=1
  8. Reload konfigurasi
    $ sysctl -p
  9. Reboot your server and run this command
    $ service pptpd start
  10. Now you can setup your PC client to connect the VPN PPTP

No comments :

Post a Comment