How to access hosts internally?

I have been running VM on a CentsOS 5x host, out in the DMZ of my network. So VM does not have any routable IP’s asigned, only the shared non-routable/intrnal IP of 192.168.10.254. The firewall/gateway forwards port 80 traffic to 192.168.10.254.

Unfortunately after a recent firmware upgrade on my firewall/gateway, I can no longer access my own hosted sites from within the network, but their domain name. All is fine of course from outside my network. So, my question. Is there some internal address that can be used to access a host? Something like http://192.168.1.254/~username/

How many hosts do you have inside? Maybe just adding your virtual server names to the hosts files(s) on the client system(s) would by the easiest?

Enabling UserDir in Apache would be another option, and would give you the behavior you’ve specifically asked about. Beware that it can have some interesting side effects for suexec (because UserDir doesn’t have VirtualHost awareness, so wrappers and such won’t exist; so apps may not work, or may work in a non-suexec configuration; either case is potentially troublesome).

BIND also supports views, so you can serve out different addresses based on where a request is coming from. This can be tricky to maintain…Virtualmin supports views but only knows how to write to one view, so it won’t manage the internal view, so you’d have to manage that yourself in the BIND module. If you have a lot of internal hosts and have many apps running under suexec, this is probably the right option.

Running a server behind a consumer-level router (I’m not sure why they’re even allowed to call them routers, since they pretty much don’t actually route…it’s more of a funnel that only goes one way) is always pretty painful. LinkSys and Netgear used to make a couple of “business” routers that are a step up, and cost around $150-$250. It’s been a while since I’ve been in the business of setting up small business networks for 10-200 machines and a few local servers, but that was always the first thing I installed when I arrived. Dealing with a $50 router from Best Buy is just not worth the time or trouble. (I tried repurposing an old PC running Linux in a few cases, and it worked as a stopgap sometimes, but reliability was always a problem, so they all got replaced with a standalone “business” router.)

The router manufacturers sometimes refer to this feature (routing!) as “loopback” or similar. Pretty much none of the consumer level routers I’ve seen have this capability, but most of the low cost business routers do.

Or, if you’re feeling hackery, you could try OpenWRT, DD-WRT, Tomato, etc.

One example of usage:

http://lifehacker.com/software/router/hack-attack-turn-your-60-router-into-a-600-router-178132.php

These projects put real live Linux on your router…and Linux definitely has the routing chops to do some real damage. (I’m not really recommending this path…it’s just a cool tinkerers project, if you’re feeling adventurous and won’t get fired for breaking the network for a day or so while you sort things out.)