2

I have LAN setup with public server on it. The server is accessible via domain example.com. If I access example.com from within lan, it goes over my ISP. I wish it went just over my local network. Hosts file is not an option, sice most pcs are mobile and will access server both from within lan and over the internet.

The question is, are there routers capable of such redirection (low-cost, up to 50€) even if it means reflashing firmware with for example dd-wtr or is it posilble with local dns server? Or is there any completely different way?

enter image description here

1

3 Answers 3

4

The term you are looking for is split dns.

You run an internal DNS server which all LAN clients use. It has the same records as your normal external DNS server, but for local systems it has the LAN ip address instead of the public one.

The downside of split DNS is problems with mobile clients - some will cache the LAN ip address while on the internal wifi, and when they switch to a public internet connection still keep trying to use it. My new cell phone seems to clear it's DNS cache when it switches connections, so this seems to be less of an issue for newer devices.

The other option is to enable NAT loopback in your router. Some just enable this by default, others have an option for it. Some call it by a different name. But basically it makes your router recognise that requests for it's public IP shouldn't go out to the internet, but to a local server.

The downside of NAT loopback is that all the traffic flows through your router. In most cases, this isn't an issue. But depending on how your network is setup and how powerful your router is, it could potentially cause problems.

0
2

It probably doesn't go through your ISP, unless something is horribly misconfigured.

If there is only one router, it knows where the DMZ network is, and chooses the apropriate route, to get to the server (the direct route in case of only one router).

2
  • Yes, unless there are VRF's or other mechanisms for handling multiple routing tables, the traffic should be routed directly to the DMZ server by the CPE router. The route path might contain the outside ip address of the router though, and that might cause confusion.
    – por
    Oct 10, 2012 at 18:02
  • Yes, that is true, but it is hard to get a vrf-capable router for ~50eur price tag, and replacing an expensive router with a ~50eur one seemed improbable.
    – mulaz
    Oct 10, 2012 at 18:17
0

Yes, please use a local DNS server. That's what DNS does.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .