My DNS works! But, what is the simplest way to add something to it?
Posted
by
Alex
on Server Fault
See other posts from Server Fault
or by Alex
Published on 2009-11-10T00:32:36Z
Indexed on
2011/03/09
8:11 UTC
Read the original article
Hit count: 289
This is my current DNS example.com.db zone file. I followed a tutorial. It works, because when I point to this DNS from another server via resolve.conf, it will actually forward me to the right IP when I do "ping example.com".
;
; BIND data file for example.com
;
$TTL 604800
@ IN SOA example.com. info.example.com. (
2007011501 ; Serial
7200 ; Refresh
120 ; Retry
2419200 ; Expire
604800) ; Default TTL
;
@ IN NS ns1.example.com.
@ IN NS ns2.example.com.
example.com. IN MX 10 mail.example.com.
example.com. IN A 192.168.254.1
www IN CNAME example.com.
mail IN A 192.168.254.1
ftp IN CNAME example.com.
example.com. IN TXT "v=spf1 ip4:192.168.254.1 a mx ~all"
mail IN TXT "v=spf1 a -all"
Right now,
ping example.com....goes to 192.168.254.1. That's great!!! it works!
My question is--how can I add something do this file so that when my other servers:
ping dbserver1....goes to 44.245.66.222
ping cacheserver1 ....goes to 38.221.44.555
I want to use it like a universal hosts file for my machines.
© Server Fault or respective owner