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:
http://www.freogan.org/2010/02/debian-pptp-vpn-opzetten/

It connects, but I have no internet acces.

I also tried
http://wiki.debian.org/HowTo/openvpn

For method 2, all client configurations and connections were done using
http://www.wowtutorial.org/win-xp/how-connect-openvpn-server-openvpn-gui-client-348.html

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.

EDIT:
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 http://poptop.sourceforge.net/yum/stable/fc7/pptp-release-current.noarch.rpm
# 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)
#localip 192.168.0.1
#remoteip 192.168.0.234-238,192.168.0.245
# or
localip 10.0.0.1
remoteip 10.0.0.21-40,10.0.0.51


# Edit /etc/ppp/options.pptpd and add google's opendns addresses
ms-dns 8.8.8.8
ms-dns 8.8.4.4


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 (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)