Is this IP address under my responsability?
Gary Wardell
gwardell at gwsystems.co.il
Thu Nov 1 07:41:57 UTC 2001
Hi,
BIND won't object but I would find lines 2 and 3 confusing. How would you know which one would be used?
If my memory serves me correctly I think 192.168.x.x is non-routable. I prefer 10.x.x.x myself, it's easier to remember.
Anyway, if the purpose of this DNS is to make mydomain known to the outside world then you can't announce 192.168.x.x to the outside
world as your address, which is what line 3 would be doing! So take out line 3 or give it a different host name. The names with
the 192.168.x.x will only be usable internally so weather you have them in the zone or not depends on your own use. The world won't
know names like hostx so it doesn't make any differnce to them.
Line 2 looks OK, assuming 1.2.3.4 is your public IP address. (Which I doubt ;-)
Since you didn't provide your complete zone file I don't know if there are any other problems. You would need at least one SOA
record and two NS records. The NS records should match your delegation data and I think cannot refer to a CNAME. Which if I am
correct would create a problem with line 8. I prefer not to use CNAMEs. I use A records instead. It's not that big a deal to use
As with small uncomplicated zones and I think easier to sort out.
Also, you don't need to repeat mydomain.com on all of your records if that is the origin of your zone file. You also can get away
without specifying the TTL on each line. Using the defaults makes the file less cluttered.
A sample might be:
$TTL 1d
; yes there is a dot there below and not an @ in the e-mail address!
@ IN SOA ns1.mydomain.com. pedro.fonseca.iscte.pt. (
2001062602 ; serial number in YYYYMMDDxx format
6h ; refresh interval for slave ns to refresh from master (6h)
1h ; retry by slave ns if master ns is unreachable (1h)
10d ; expire from slave cache when master ns is unreachable for this period (10d)
1d ; default time-to-live in any DNS cache (24h)
)
; The lines below use the name from the line above.
; The @ above says to use the origon of the file
; which in this case comes from ZONE statement in the named.conf file.
;nameservers
IN NS ns1.mydomain.com.
IN NS nsx.someotherdomain.net.
;
IN A 1.2.3.4 ; this line lets you type http://mydomain.com/
localhost IN A 127.0.0.1
host1 IN A 1.2.3.4
hostinternal IN A 192.168.1.1 ; only if you really need this one
host2 IN A 192.168.1.2
host10 IN A 192.168.1.10
host11 IN A 192.168.1.11
host12 IN A 192.168.1.12
ns1 IN A 1.2.3.4
www IN A 1.2.3.4 ; this line lets you type http://www.mydomain.com/
; End
Regards,
Gary
> -----Original Message-----
> From: bind-users-bounce at isc.org [mailto:bind-users-bounce at isc.org]On
> Behalf Of Pedro Fonseca
> Sent: Wed, October 31, 2001 9:18 PM
> To: comp-protocols-dns-bind at moderators.isc.org
> Subject: Is this IP address under my responsability?
>
>
>
> Greetings!
>
> I have a small home network with private IPs. There is one computer
> that acts has an Internet gateway and has two ethernet cards: one is
> eth0, with a static Internet accessible IP (let's say 1.2.3.4) and the
> other is eth1, with private IP address of 192.168.1.1. I have my
> private network properly configured in a zone file (db.192.168.1),
> with all the private IPs mapping to the corresponding machine names,
> etc. I have a domain name (let's say mydomain) delegated to the
> nameserver at the static IP.
>
> But now I wonder... Is the static IP 1.2.3.4 under my responsibility?
> Can I include it in any of my zone files? My existing zone files are:
>
> . db.mydomain
> . db.192.168.1
> . db.127.0.0
>
> The following is an excerpt of my 'db.mydomain' file.
>
> localhost.mydomain.com. 86400 IN A 127.0.0.1
> host1.mydomain.com. 86400 IN A 1.2.3.4
> host1.mydomain.com. 86400 IN A 192.168.1.1
> host2.mydomain.com. 86400 IN A 192.168.1.2
> host10.mydomain.com. 86400 IN A 192.168.1.10
> host11.mydomain.com. 86400 IN A 192.168.1.11
> host12.mydomain.com. 86400 IN A 192.168.1.12
> ns1.mydomain.com. 86400 IN CNAME host1.mydomain.com.
> www.mydomain.com. 86400 IN CNAME host1.mydomain.com.
>
> Is the second line OK? Can I give the same name to the computer with
> the two ethernet cards? Or should I only have private IPs in this
> zone? I'm pretty much confused with this, please give me some
> directions...
>
More information about the bind-users
mailing list