Workaround Inability in NAT Loopback on DD-WRT r15760 or above

Recently I found that my router running DD-WRT is not able to handle NAT loopback (Accessing router’s public IP from internal network). After searching through the Internet, I found this post mentioned that it is a problem in DD-WRT since revision r15760. It is stated that the problem will not be fixed. As a user, we can only apply workaround to the issue. Here are the steps:

  1. Make sure your DD-WRT version is r15760 or newer
  2. Navigate to your router administrator page
  3. Go to the Administrator section, Commands section
  4. In the Commands text box, input the following command:
    insmod ipt_mark
    insmod xt_mark
    iptables -t mangle -A PREROUTING -i ! `get_wanface` -d `nvram get wan_ipaddr` -j MARK --set-mark 0xd001
    iptables -t nat -A POSTROUTING -m mark --mark 0xd001 -j MASQUERADE
  5. Press the Save Firewall button. You should see the following screen:
    DDWRT NAT Loopback
  6. Reboot your router, the NAT loopback should be function now
Advertisements

2 responses to “Workaround Inability in NAT Loopback on DD-WRT r15760 or above

  1. Thanks for this post. I’m running build 20180 om Buffalo WZR-600DHP and this worked perfectly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s