D-Link DIR-655: How to create a static route to LAN

When I first acquired the D-Link DIR-655 wireless router it was possible to add static routes both to the WAN and the LAN. Later on, after upgrading to firmware 1.03, the option to add routes to LAN disappeared. This was a real nuisance!

I used the route to LAN option to support VPN access from the Internet to the LAN. I have an OpenVPN server on the LAN, and in the DIR-655 I configured a port forward to the OpenVPN server. This allows access from the Internet to computers on the LAN. The problem was the return route from the LAN computers to the VPN client. The LAN computers are configured with the DIR-655 as the default gateway, but the return route to VPN clients must go through the OpenVPN server. The solution was to create a static route on the DIR-655 for the VPN client network, with the OpenVPN server as the gateway and LAN as the interface.

But, as of firmware 1.03 the LAN option disappeared. Currently I'm using firmware 1.11EU.

However, yesterday I needed to re-visit the issue, and discovered that people had found a way to solve the problem:

http://forums.dlink.com/index.php?action=printpage;topic=6422.0

It turns out that the functionality has not been removed from the firmware, it is just that the LAN option has been commented out in the HTML page! This can easily be fixed on the fly using Firefox with the Firebug add-on installed. Just right-click on the Interface option and select to Inspect the element:

pic1

Looking at the HTML (with the View comments option turned on), you see that the LAN option has simply been commented out:

pic2

Click on the Edit button to edit the HTML on the fly:

pic3

Remove the comments surrounding the LAN option:

pic4

Click the Edit button again, and now the LAN option is available:

pic5

Now you can enter and save a static LAN route.

Keep in mind:

  • When you later view the Routing page, the page will always display "WAN" as the interface even though a route is in fact a LAN route. (If you look at the HTML above you see that there is also a hidden input field for each route that holds the actual interface value, 1=WAN and 2=LAN. When you select from the drop-down list this actually changes the value of the hidden field. You can inspect the hidden field to check if the route really is a LAN route.)
  • You will need to repeat the steps above on the appropriate interface every time you want to enter a new static LAN route.
Permalink

For those trying to get ip flowing between a DIR-655 as AP running DLINK firmware and DIR-615 (mine is h/w ver e3) running DD-WRT in wireless client mode, this solves the problem of connecting to your 615-based clients from the 655's LAN side because all the damn packets are hijacked by the WAN without the ability to add a static LAN route for the 615 on the 655 end.  And, since connections to your equipment are all wired at the 615 end (who cares, it's all behind your TV anyway, 655 wireless range is good enough on it's own), you avoid halving the wireless speed between the 655 and 615 by doing it this way when streaming from wired devices at the 655 end wirelessly to your TV, WDTV box, etc, at the 615 end.I've been fighting with this setup for two days now and this little stroke of genius got it all working for me better than it would have even if DD-WRT would work in wireless repeater mode on the 615 (e3).Thanks again!Bill

Hi, Guys i think I'm şitting on the Simeon to my problem here. If someone could just guide me through. I have 2 windows xp pc connected to a dlink dir 615 n 300 router. This router is then connected to my Internet moden on theough its WAN port. Both my pc draw internet from the router. My wireless devices connect to the router to get internet as well. And Internet is working properly on all devices. Both fixed and those on the wifi. My problem is that i can't get both my pc's which are connected to the router and are able to get Internet access to communicate with each other. Ie. No lan. Please help someone. Z
Permalink

I had to actually right click the WAN option and do "Inspect element with Firebug"Once there, i "Edit" the following:old     <option value="WAN" default="true">WAN</option>new    <option value="LAN" default="true">LAN</option>click "Edit"Then "Save Settings" at the top.(it gives the message ("Save even though no changes were made?")  Say Yes Thanks,TheFOSS
Permalink

I was totally dissapointed when I found out I could not add static route to inside network for the same purpose - Enable Remote Access VPN.I bought DWR-112 which is a 3G Router with 3G USB dongle modem attached to it. First dissapointment was I could not get internet connection with 3G D-Link DWM-156 type dongle, and I found out that I needed to upgrade my firmware to 1.03 (from 1.01) to be able to work with own D-Link DWM-156 3G modem dongle. So for you guys that are having the same problem like I did, this can be your clue.Next, I have a VPN Router to provide remote-access VPN. I also functioned this router as firewall within my home network to protect my resources as I share an apartment unit with other people. But bummer, I can't add static route to lan interface ??!! D-link, I don't think this is a descent one, why do you have to block this and we can't have extra subnet and routed to other device? How does this hurt you?? not nice... not nice...Then luckily I stumbled upon this guide. Another problem is the value of the option in HTML is somewhat different than mine in DWR-112, maybe because of firmware upgrade or native I don't know... then I just try to use value of 2, LAN, LAN-0 ... still not working... and finally I put LAN-1 and it works... yayy... !!Thank you, you are my saviour.So for you guys outthere who are looking for this the hint works just adjust the value field.. for DWR-112 firmware 1.0.3, it's LAN-1.Good luck.
Permalink

We have two routers: one connected to internet, other connected to another local network! Before I read this solution I had to configure static routes on each computer! But, configuring router is much better solution... THANKS ALOT! (I'm little bit dissapointed with D-Linl, though.)
Permalink

I gave that HTML editing a try to get my internal forwarding with JNOS (on Linux) for my Ham station working, and after the 3rd try.....I was successful.....Thanks very much for the info......Werner VE4UA
Permalink

Once adapted for the different HTML coding, this also works for a DIR-615 C1 with the latest v3.13NA firmware installed. I only had to use the "F12" developer tools in Internet Explorer v10 and once the HTML is modified to simply replace all pertinent "WAN" entries for "LAN", you only have to use the editor's "refresh" button (NOT the browser's refresh button.) to activate the changes on the "real" webpage and then click on the "Save Settings" button and even though the interface says that there are no changes save anyway and after it was saved it still erroneously showed the configured interface as WAN, when looking at the actually active routing rules in the "Status - Routing" section, it showed that it indeed applied it properly and a quick refresh via the already configured remote port forwarding in another router/firewall device proved that it definitely works as the DIR-615 itself is finally able to route packets back the other subnet, which it wasn't able to do before.I could have chosen to upgrade the router to DD-WRT to have even more flexibility, but that would have been overkill and this also took much less time and it's also a "stealthy" solution as this feature is "not supposed" to be supported/possible to do so etc.Thanks for the tip, really simple once you know!
Permalink

I am attempting this for a Dlink DIR 850L, for the purpose to launch the Netflix client from a RokuI have inspected the element and edited the default setting being Default setting<option value="WAN-1">WAN (180.XXX.XXX.XXX)</option> </select> To now read Edited setting<option value="LAN-1">LAN (192.168.0.1)</option> </select> I am able to then save the setting and launch Netflix "success" BUT the Dlink console manager will return the default setting. As per your tutorial except it then stops the Netflix client from launching again. How did you get the Dlink to keep the edited setting and not revert to the default please?
Permalink

Thanks to your hack I was able to make the DIR-655 a secondary access-point to my main router. I was able to acheive this by using your trick in addition to splicing the routes up into 3 subnets.dest 1.0.0.0 subnet 128.0.0.0dest 128.0.0.0 subnet 192.0.0.0dest 193.0.0.0 subnet 192.0.0.0The reason this is required is because the DIR-655 does not support 0.0.0.0 0.0.0.0 + GW as a true router does. The subnet is separated into three since you cannot overlap with the local LAN subnet of 192.168.0.X.The other configuration is simple, disable DHCP, firewalls, upnp etc etc. Set LAN IP address to an unused address on your network and that should do it.I hope someone finds this helpful and brings their DIR-655 to life! I confirmed this works with firmware version 1.37NA (latest as of 1/24/2016). Good luck!