Setup VPN between Windows and Linux server using pptpd
Configure pptpd VPN server on the Linux server
install pptpd on the Linux server
zypper in pptpd (for SuSE)
vi /etc/pptpd.conf
change the line:
option /etc/ppp/options.ppp0
to
option /etc/ppp/options.pptpd
add the lines:
localip 192.168.7.1
remoteip 192.168.7.100-199
vi /etc/ppp/options.pptpd
add the lines:
# Refuse PAP, CHAP or MS-CHAP connections but accept connections with
# MS-CHAPv2 or MPPE with 128-bit encryption
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
ms-dns 8.8.8.8
ms-dns 8.8.4.4
vi /etc/ppp/chap-secrets
add the line:
miki * miki123 *
Restart pptpd service:
systemctl restart pptpd
check the syslog:
tail -f /var/log/messeges
Create a VPN connection in Windows 2012
Control Panel → Network and Sharing Center
Click on the “Set up a new connection or network”
Choose “Connect to a workplace” and click “Next”
Click on the “Use my Internet connection (VPN)”
Enter the IP address (or hostname) of the VPN server in the “Internet address” field.
Enter a name in the “Destination name” field.
Click “Create”
Again, go to Control Panel → Network and Sharing Center.
Click on the “Change adapter settings” link (in the left pane)
Right click on the “VPN” connection we created and choose “Properties”
In the “Security” tab choose “Allow these protocols” and enable:
CHAP and MS-CHAP v2
Switch to the “Networking” tab and remove the IPv6 option
In addition in the “Networking” tab, select the IPv4 and click on the “Properties” button.
In the “TCP/IP IPv4….” properties pop-up window click on the “Advanced…” button
Uncheck the option “Use default gateway on remote network” and then click on the “OK” button.
Connect to VPN
From the previous screen (“Change adapter settings”) right click on the VPN connection we created and choose “Connect/Disconnect”
The Windows will show a blue “Network” right pane, choose the VPN connection we created
And click on the “Connect” button
Enter the username and the password then click on the “OK” button
If everything is ok, the VPN connection will show “Connected”.
Open a CMD and execute ipconfig you should see a “PPP adapter VPN…” and ip address (for example 192.168.7.100).
Try to ping the server IP address (ping 192.168.7.1)