I have a DLINK DIR-655 router hooked to a fiber connection for 100/10 Mbit/s speed.
I have set up a port forward rule on the DLINK for TCP port 1723 to the Pi IP address 192.168.0.150.
And I have registered the router for the DLINK free DynDns service so I have a hostname pointing to my router.
I believe this is working OK, since I have other port forwards that actually work fine (like a Synology Diskstation NAS web interface).
In order to set up the VPN server I have used information from two tutorials I have found on the Internet:
1: RaspberryPiHelp
2: James Slootweg
Both of these are based on raspbian running on the Pi, but I have raspbmc (version 2013-12-23). Don't know if this is the cause of my problems.
Based on the tutorials I have done as outlined below.
I first went through tutorial #1 and then when it failed to deliver I modified the files according to #2.
I have marked the lines with 1, 2 or 1+2 depending on if they are used in the respective tutorial:
Code: Select all
Procedure to set up PPTP on Pi (via SSH login using PuTTY):
-----------------------------------------------------------
1) sudo apt-get update
1) sudo modprobe ppp-compress-18
#if errors in modprobe then try this (was not needed for me):
1) sudo apt-get upgrade
1+2) sudo apt-get install pptpd
1+2) sudo nano /etc/pptpd.conf
at end of file enter:
localip 192.168.0.150 (IP of RPi)
remoteip 192.168.0.80-89 (Range of IP to feed to clients)
1+2) sudo nano /etc/ppp/pptpd-options
at end of file add:
1+2) ms-dns 192.168.0.129 (IP of router's DNS)
2) nobsdcomp
1+2) noipx
1+2) mtu 1490
1+2) mru 1490
1+2) sudo nano /etc/ppp/chap-secrets
add login users on the form:
<username><TAB>*<TAB><password><TAB>*
I added two logins
1) sudo service pptpd restart
Note: tutorial #2 ends in a complete Pi restart, hence did not have this
1) sudo nano /etc/sysctl.conf
uncomment or add the following line:
net.ipv4.ip_forward=1
1) sudo sysctl -p
1+2) sudo nano /etc/rc.local
add line(s) above the exit 0 line, where the IP addresses are the first handout IP and the Pi's own address:
1) sudo iptables -t nat -A POSTROUTING -s 192.168.0.80/24 -o eth0 -j SNAT --to 192.168.0.150
2) sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
2) sudo iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
Network router setup:
---------------------
Configure port forwarding so that TCP port 1723 is forwarded to 192.168.0.150 (IP of the RPi)
Starting up service:
--------------------
2) sudo shutdown -r now (to restart Pi)
When I try to connect from a Win7 laptop basically the same happens even though I get an error dialog showing the error: What can I do to continue?
Are there some log files on the Pi that I can inspect to tell me more about what happened?
Any other advice from someone?
Can the raspbmc distro not be used as a PPTP VPN server?
I have posted the same problem over at STMLabs and the XBMC Forum but so far no replies....