How to setup pptp vpn on linux?

Asked By 0 points N/A Posted on -
qa-featured

Hello users,

I am using Linux for 1 months. For my business purpose i want to setup pptp vpn connection on my Linux based laptop.

I am trying a lot but i can not do this.

Is there anyone to help me?

SHARE
Best Answer by Montefalcon Sop
Answered By 0 points N/A #158188

How to setup pptp vpn on linux?

qa-featured

Hello Saonbd

  • Please ensure the installation of PPTP daemon (server) at first place, and you can use apt-get for installing the same

apt-get install pptpd

  • When done, proceed to create new user account for the VPN server by editing the chap-secrets file. You can use the editor of your choice, preferably Nano.

nano -w /etc/ppp/chap-secrets

  • In order to add each user in new line

yourusername pptpd yourpassword *

  • Then you need to configure localip/remoteip assignment on pptpd.conf

nano -w /etc/pptpd.conf

localip 192.xxx.xxx.xxx

remoteip 192.xxx.xxx.xxx,192.xxx.xxx.xxx

  • Then you need to enable IP forwarding by editing sysctl.conf file

nano -w /etc/sysctl.conf

  • Now, uncomment the following line

net.ipv4.ip_forward=1

  • Then you would save the file & re-load configuration

sysctl -p

  • Then you need to edit rc.local file for ip table rule

nano -w /etc/rc.local

  • Add the following lines exactly above exit line. (eth9 is my public Ethernet port, modify as required)

/sbin/iptables -t nat -A POSTROUTING -s 192.168.111.0/24 -o eth9 -j MASQUERADE

/sbin/iptables -I FORWARD -p tcp -syn -i ppp+ -j TCPMSS -set-mss 1356

  • Lastly, you need to define the DNS to use with your pptpd. Preferably, Open DNS or Google Public DNS

nano -w /etc/ppp/options

  • Uncomment the entries with ms-dns 192.168.1.1 and 192.168.1.2 then replace the IP with Google Public DNS IPs so it look like this

ms-dns 8.8.8.8

ms-dns 8.8.4.4

Setup would complete. Then please reboot your server and test connectivity using PPTPD.

Hope this helps !

Arseno

Best Answer
Best Answer
Answered By 0 points N/A #158189

How to setup pptp vpn on linux?

qa-featured

Hello,

Setup pptp vpn connection on Linux: Please follow the instructions you can easily connect.  

1. Click Network Manager icon then select VPN connection > configure VPN

2.  In Network connection on VPN tap you can click Add button.

3.  Select from the list Point-to-Point Tunneling Protocol (PPTP) after that click Create button.

4.  Now you can see Editing VPN connection box open. You use server name or IP on gateway

5.  Type username and VPN password.

6.  Open PPTP Advanced Options by Click on the Advanced.

7. Check the MSCHAP and MSCHAPv2 On the Authentication.

8.  Check for Use Point-to-Point Encryption (MPPE), Security: All Available (Default), Allow Deflate data compression, Use TCP header compression On the Security and Compression.

9. Press Okay and close the PPTP Advanced Options window.

10. Give Apply to close the VPN Connection window.

11.  Close the Network Connection window.

12. For connection click the Network Manager in tray, select VPN Connections after Click VPN Connection.

Login/Register to Answer

Related Questions