{"id":237,"date":"2012-05-14T10:58:54","date_gmt":"2012-05-14T15:58:54","guid":{"rendered":"http:\/\/www.marcblase.com\/blog\/?p=237"},"modified":"2014-10-10T08:41:04","modified_gmt":"2014-10-10T13:41:04","slug":"dd-wrt-internal-routing-hack","status":"publish","type":"post","link":"https:\/\/ma.rcbla.se\/blog\/2012\/05\/dd-wrt-internal-routing-hack\/","title":{"rendered":"DD-WRT Internal Routing Hack\/Fix\/Mod"},"content":{"rendered":"<p>This hack\/repair is <a href=\"http:\/\/www.dd-wrt.com\/phpBB2\/viewtopic.php?t=89353\" target=\"_blank\">well documented<\/a> in the DD-WRT Forums but I&#8217;m including it here so I can easily find it for future reference.<\/p>\n<p>I&#8217;m pointing a subdomain back to my local network which resolves to a server running apache. This works great outside the network, but internally &#8230; no dice. So the following rule needs to be applied to get things working:<\/p>\n<p>Save the following commands to the Firewall Script on the Administration->Commands page to fix loopback.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ninsmod ipt_mark \r\ninsmod xt_mark \r\niptables -t mangle -A PREROUTING -i ! `get_wanface` -d `nvram get wan_ipaddr` -j MARK --set-mark 0xd001 \r\niptables -t nat -A POSTROUTING -m mark --mark 0xd001 -j MASQUERADE \r\n<\/pre>\n<p>UPDATE: NAT loopback is once again working since build 19969. This fix should only be needed for builds between 15760-19969.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This hack\/repair is well documented in the DD-WRT Forums but I&#8217;m including it here so I can easily find it for future reference. I&#8217;m pointing a subdomain back to my local network which resolves to a server running apache. This works great outside the network, but internally &#8230; no dice. So the following rule needs [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[35,56,36],"class_list":["post-237","post","type-post","status-publish","format-standard","hentry","category-networking","tag-dd-wrt","tag-networking","tag-script"],"_links":{"self":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":4,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"predecessor-version":[{"id":419,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/237\/revisions\/419"}],"wp:attachment":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}