Hi
I've been trying to figure this one out for too long. Have read nummerable amounts of documentation but this exact task wasn't explicitly mentioned. Let's get on with it:
I am on a LAN. Two servers: 1. firewall, router... 2. (internal server) dns, webserver... Example domain name: foo.bar
I want a second (internal) webserver, let's call it server 3. Example domain name: test-foo.bar I want the machines on the internal network to be able to see test-foo.bar
It is supposed to be simple but I am reluctant to play around as I don't want a downed internet connection for the people with whom I share the connection.
I believe I have to stop bind, enter the ip and domain name of server 3 in the forward and reverse zone files of server 2, and start bind. But how exactly?
172.16.0.254 - Server 1
172.16.0.90 - Server 2
172.16.16.98 - Server 3
Server 2:
Code:
# cat /etc/named.conf
options {
directory "/var/named";
version "GoAway(TM) v 0.91";
allow-transfer { 172.16.0.254; };
};
acl "fooservers" {
172.16.0.90;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "foo.bar" IN {
type master;
file "foo.bar";
allow-update { fooservers; };
};
zone "16.172.in-addr.arpa" IN {
type master;
file "foo_reverse.bar";
allow-update { fooservers; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
include "/etc/rndc.key";
Code:
# cat /var/named/foo.bar
$ORIGIN .
$TTL 86400 ; 1 day
foo.bar IN SOA will.foo.bar. hostmaster.foo. (
2002237590 ; serial
3600 ; refresh (1 hour)
900 ; retry (15 minutes)
1209600 ; expire (2 weeks)
43200 ; minimum (12 hours)
)
NS corsa.foo.bar.
A 172.16.0.90
MX 5 corsa.foo.bar.
$ORIGIN foo.bar.
$TTL 1080 ; 18 minutes
- A 172.16.16.127
138h A 172.16.16.16
aa-gxc7xo0d23fu A 172.16.16.1
ACER A 172.16.16.248
acer-418f58e23c A 172.16.16.122
......... And more stuff concerning connected hosts and their respective ip's.........
......... With the odd
$TTL 86400 ; 1 day
corsa A 172.16.0.90
$TTL 1080 ; 18 minutes
daniel-443 A 172.16.16.84
In between ...............................................................
Code:
# cat /var/named/foo_reverse.bar
$ORIGIN .
$TTL 86400 ; 1 day
16.172.in-addr.arpa IN SOA corsa.foo.bar. hostmaster.foo.bar. (
2002225891 ; serial
28800 ; refresh (8 hours)
7200 ; retry (2 hours)
2419200 ; expire (4 weeks)
86400 ; minimum (1 day)
)
NS corsa.foo.bar.
$ORIGIN 16.172.in-addr.arpa.
$ORIGIN 16.16.172.in-addr.arpa.
$TTL 1080 ; 18 minutes
109 PTR Jonas339.foo.bar.
114 PTR Kristijan-225.foo.bar.
...
I have replaced the actual domain name in the code with foo.bar..
Could anyone give a step by step guide? I only assume that the forward zone file is foo.bar and that the reverse zone file is foo_reverse.bar and I am not really sure where and how much I should insert into those files.
I would also like comments on whether you consider it unsafe to share the information I just did (can't see how it should be) and what you think of the LAN being a B-class network (+200 users).
Thanks
-Brian