This article describe, how to setup a VPN connection between a DD-WRT router and a TP-Link TL-ER6120 acting as the PPTP server.

Configure PPTP Server

Configuration of TL-ER6120 is very trivial, their is so little options it's hard to do a mistake. First, go to VPN > L2TP/PPTP > IP Adresse Pool. Create a new address pool range. Notice, this address pool must not conflict with local subnet nor the remote subnet. i.e.:

Go to VPN > L2TP/PPTP > L2TP/PPTP Tunel and create a new tunnel as follow:

TP-Link router config

Configure PPTP Client

Go to Services > VPN, change the PPTP client settings as follow:

The magic setting is the MPPE encryption. noipdefault let the pptp server provide an IP to the client. I figure out the mppe required,stateless by trial and error. Don't try with stateful option. The PPTP client doesn't support it.

DD-WRT router config

If you try with this settings, the PPTP client will establish a connection, but will disconnect within the next minute. After investigation, I notice the PPTP client is creating a bad route to the remote IP forwarding all the trafic to the ppp0 interface.

Removing this route fix it all. To automate this process, go to Administration > Commands. Enter the following text and save it as startup script.

(while [ ! -f /tmp/pptpd_client/ip-up ]; do sleep 10; done
cp /tmp/pptpd_client/ip-up /tmp/ipup.tmp
sed '/^ kelokepptpd)/a\  /sbin/route del -host $5 dev $1' < /tmp/ipup.tmp > /tmp/pptpd_client/ip-up ) &
Category: • 2013-01-08
Share this post

Subscribe to our newsletter

Get the highlights in your inbox.