A company I work for has a VPN connection at the office and from time to time I need to pull firmware, software, or various documents from them. Other times there are a couple Linux servers on the local network that I need to work on so I can either SSH from the outside or create a VPN connection and hit the devices through the local network. The amount of data I am pulling from the local network has become more frequent so I needed to find a way to not have to create a VPN connection from my laptop so often and was thinking that it would probably just be easier to connect my Linksys WRT600N router running dd-wrt firmware to the office VPN server. This way I would always have a connection to the office without having to interrupt work and create a PPTP VPN connection.
Below I describe how to configure the dd-wrt side of the VPN connection. The far side is a Linksys RV016 running the default PPTP Server with users configured.
PPTP Client Router:Linksys WRT600N with DD-WRT v24-sp2 (07/01/09) vpn [build 12426]
PPTP Server Router:Linksys RV016 with Linksys 220.127.116.11-tm (Jun 6 2008 20:17:06)
RV016 PPTP Server Configuration:
Again the PPTP Server is set up to the default which involves checking the box at the top of the configuration page located at VPN >> PPTP Server. You wold also need to add an IP range which would be a chunk of addresses out of the LAN side of your network.
DD-WRT PPTP Client Configuration:
Use the below settings to have the VPN connection work properly. The text after the # signs below are descriptions and are not part of the configuration itself.
PPTP Client Options: Enable
Server IP or DNS Name: 18.104.22.168 # Use the IP Address of the VPN Server here
Remote Subnet:192.168.10.0 # The network address of the remote subnet on the PPTP Server
Remote Subnet Mask: 255.255.255.0 # The subnet of the above set of addresses on the PPTP Server
MPPE Encryption:mppe required,no40,no56,stateless # This is important so make sure it is exact.
MTU: 1450 # The default should be left alone here
MRU: 1450 # The default should be left alone here
NAT: Enabled # The connection will appear to work with NAT disabled but it is not functioning properly.
User Name:exampleuser # The user provided to you by the RV016 administrator
Password:examplepass # The password provided for the above user.
After setting all of the above make sure to click the Save button before hitting the Apply button. Then click the Apply button which will reload the PPTP settings. One of the keys to getting the connection to work properly is rebooting the router after all of the settings are correct. Before I knew this I was making changes thinking the PPTP connection was resetting each time I clicked the Apply button but really they were not changed until the WRT600N was rebooted.
If you want to watch the VPN connection take place then SSH to the WRT600N Linksys router and type “ps” from the shell. This will provide a process list of processes currently running on the device. After a short amount of time you will see the PPTP client script kick off with a “sleep 30” process right below it indicating that it is waiting 30 seconds to run. After this you will see another PPTP process followed by a call manager process that is making the connection to the remote PPTP server. If the connection is successful you will see to pptp processes which includes “pptp: call manager for 22.214.171.124” and “pptp: GRE-to-PPP gateway on (null)”. You will also now have a new interface of ppp0 which should indicate what address was assigned to you on the remote network. You can obtain this address by typing “ifconfig ppp0” to see just the PPP interface or “ifconfig -a” to see all interfaces from the CLI.
There was an older QD article I had written involving the same concept but more for moving from your XP/Vista computer to have the client connection on the WRT600N. This article is more based around the concept of WRT600N as client and RV016 as PPTP server.