Single blue router seeks external access; no smokers

Tagged:  •  

It occurs to me that I don't know enough about routers and the web servers that love them. One of the minor annoyances I have with Wordpress is that I can't view the site as if I were accessing from outside of my LAN when I'm on my LAN. Wordpress uses PHP to fill out the paths for its various components (i.e. theme files, specifically stylesheets, functions, etc.). It grabs the base URL (hackwater.com) for the blog and concatenates that with the path for the file it is trying to load (hackwater.com/wp-content/themes/themeofthemonth/), adding the filename to the end of it (stylesheet.css), and presto! Requests from within a LAN are hosed.

The problem (probably; here is where my lack of router knowledge is most glaring) is that my router intercepts http requests for hackwater.com from within the LAN. If I click on an administration link and my Wordpress installation is pointing at hackwater.com instead of my local hostname, the request goes out via DNS, eventually finding the Zoneedit nameservers that tell the request that the files in question are at some arbitrary IP address. The IP address points to my network; specifically, it points to my router, as that is the gateway controlling first access/last egress (to my network; I realize it's more complicated than that when we throw in my DSL bridge and the various external routers/servers on the merry Internet ring/loop). The gateway seems kind of dumb: it has an instruction telling it to send port 80 requests to an internal IP address (that of my Debian server). This instruction, however, does not send port 80 requests from an internal IP address to the web server. It instead intercepts them and sends them to the mini-web server installed on the router that is intended for router administration. It's a convenient feature, but my router is kind of old. It doesn't let me change a whole lot from the web administration (the telnet administration has more features, but is much more difficult to navigate).

Solving this problem is probably as simple as changing the port to access the router administration functions. If I disable the web administration function (and administer only via telnet), or move it to a different port than 80, it's possible that I can convince it to pass through internal requests for hackwater.com. I briefly thought that perhaps some Apache mod_rewrite magic might solve my problem until I realized that the http requests are probably not even getting to the web server. It seems my options are to try to hack my router (which could leave me without a router) or to try to find a better router. It'll be difficult to find a better router that is as cheap, but I suspect I'm getting what I paid for this one. But since I'm unsure that my router works the way I have described, through my observations, it's entirely possible that I'm missing something obvious and easy I can do to resolve this. Adding a fourth machine to my living room to work as a router would certainly give me maximum flexibility, but for space and heat reasons, this option is out of the question. I think I'll carefully explore my router and see what can be done without necessarily hacking it.