Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ Linux VPN

Posted by: kakaboeie Jul 16 2011, 01:37 PM

I am trying to install a VPN on a debian server, and a centos server. They will be connected to with windows 7.

Starting out with debian 6.0
I tried the following:

It connects, but I have no internet acces.

I also tried

For method 2, all client configurations and connections were done using

But that won't even connect. It gave the message "Expected Remote Options hash (VER=V4): " and ended with "TLS Error: TLS key negotiation failed to occur within 60 seconds"

Any ideas? I want to use the VPN to anonimize my browsing activity on the windows 7.

Okay I actually got the Debian one to work, but the centos one is giving me random errors when trying to connect, including 800, 809, 619. This is what I did so far;

Step 1. Installing pptpd the pptpd is the daemon that runs the pptp server. To install this:

# rpm -Uvh
# yum --enablerepo=poptop-stable install pptpd

Step2. Next you will need to modify the pptpd.conf

$ vim /etc/pptpd.conf

Then scroll down to the bottom and modify the following lines with the subnets you would like assigned:

# (Recommended)
# or

# Edit /etc/ppp/options.pptpd and add google's opendns addresses

Step 3. The vpn server is now configured and now you must setup authenticated users:
$ vim /etc/ppp/chap-secrets

The config file is very straight forward and I have an example of a user included:

# Secrets for authentication using CHAP
# client server secret IP addresses
johndoe pptpd johndoepassword *

Step 4. When pptpd was installed it started automatically so we will need to restart it to apply the changes:

$ /etc/init.d/pptpd restart

Now, if you would like to add internet access over this vpn, you can do this:

$ vim /etc/sysctl.conf

and find the line for ipv4 forwarding and make sure it = 1:
net.ipv4.ip_forward = 1

Then use iptables to get the net forwarded:

$ /sbin/iptables -P FORWARD ACCEPT
$ /sbin/iptables --table nat -A POSTROUTING -o eth0 -j MASQUERADE

Powered by Invision Power Board (
© Invision Power Services (