Re: DNS Name Server with one IP address
From: Jeremy S Lowery (jlowery_at_internetpro.net)
Date: 01/27/04
- Next message: Jeroen Geilman: "Re: slow load times over LAN using domain versus IP address"
- Previous message: Bev A. Kupf: "Re: how to mount linux partition in OS X via samba"
- In reply to: Ivan: "DNS Name Server with one IP address"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Jan 2004 23:29:22 -0600
Along with the other great responses, I thought I'd share my interesting
setup with ya. I have the exact same hardware configuration as you, except
I have a dynamic dns.
I use www.no-ip.com's authoritive DNS servers with the registar. They offer
a service that lets me run a client and send my IP to them when it changes
so their records can reflect this (You don't have to worry about this).
My gateway box is also setup to be the authoritive nameserver on my domain.
However, since "the world" sees the authoritive ones as ns1.no-ip.com and
ns2.no-ip.com, it's only really authoritive to machines I tell it to be for
(in this case, my local network).
I did this so I could have all of my local machines (which have private IP's
and get NAT'ed through the gateway) use my domain.
Some example config:
I have gateway.mydomain.tld registered with no-ip to point to my gateway
box. the no-ip record has my internet ip.
I have bind9 on the gateway acting as the authority for my domain:
from named.conf:
zone "mydomain.tld" {
type master;
notify no;
file "pri/mydomain.tld";
};
and my zone file for my domain:
$TTL 86400
@ IN SOA mydomain.tld. jlowery.mydomain.tld. (
2 ; Serial
8H ; Refresh 8 hours
2H ; Retry 2 hours
1W ; Expire 1 week
1D ; Minimum 1 day
)
NS gateway
MX 10 gateway.mydomain.tld
gateway A 192.168.1.1
www A 192.168.1.1
# some machines on my local network
oracle A 192.168.1.10
trinity A 192.168.1.11
The one thing to be sure of is keeping the gateway records in sync with my
external provider's records. if I put a cname on the external provider for
the gateway, I have to do it on the gateway too.
So as far as my local network is concerned, gateway controls mydomain.tld.
Oh, and also named.conf needs the "hints" record to be able to resolve
everything else.
zone "." IN {
type hint;
file "named.ca";
};
The only thing left to do is have all the local network machines use
192.168.1.1 (the gateway) as their nameserver.
So all the machines on my local network are using DNS for my domain (I only
have 5 but this is my network and I like playing :) and it works globally
as well.
if you resolve the gateway from the internet you get the external IP, if you
resolve it from the LAN you get the internal IP.
Jeremy
- Next message: Jeroen Geilman: "Re: slow load times over LAN using domain versus IP address"
- Previous message: Bev A. Kupf: "Re: how to mount linux partition in OS X via samba"
- In reply to: Ivan: "DNS Name Server with one IP address"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|