Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a self hosted server with Apache2 pointed with the domain I have also some virtual servers,, etc.

This server is in my LAN, and when I try to acces to my server within the lan throw y get my router's configuration page. From outside the LAN and works properly. From inside the LAN (server internal IP) shows the default webpage (, but I can not get I also have a LAN name server in with bind9.

I set up my gateway with my LAN-NS as primary NS

I solve this problem creating a new dns zone in the NS.

This are my config files:

$TTL 86400      ; 1 day
home.lan. IN SOA server.home.lan. hostmaster.home.lan. (
    2008080901 ; serial
    8H ; refresh
    4H ; retry
    4W ; expire
    1D ; minimum
home.lan. IN NS server.home.lan.
$ORIGIN home.lan.
; Set the address for localhost.home.lan
localhost    IN A
router       IN A
server          IN A
mypc     IN A

$TTL 86400      ; 1 day IN SOA hostmaster.home.lan. (
    2008080902 ; serial
    8H ; refresh
    4H ; retry
    4W ; expire
    1D ; minimum
localhost    IN A
www         IN A
cloud       IN A

My DNS and my names are working properly now

My question are:

  1. What do you think about my solution?
  2. Can I change the A zone with CNAME to server.home.lan (this is the domain in the LAN to the server)?
  3. How can I set a default IP for all my

share|improve this question

You need to ensure that your default gateway knows about the internal server being the domain controller of the .lan TLD. Personally i would enable static DNS forwarding for .lan. Once you get your DNS lookups forwarded to the correct DNS server, routing should take care of the rest, as it's all happening on your internal LAN

share|improve this answer
My names inside the LAN are working properly, now. I already change the default dns in my gateway to the dns inside my lan. – Freefri Nov 12 '12 at 10:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.