I m a new user of Linux. I installed RedHat 7.3
I have total 3 PC ....One redhat 7.2 , one redhat 7.3 and other is redhat 8..installed...I am trying to configure DNS at redhat 7.3 at pc2
I edit /etc/hosts file as :-
# Do not remove the following line, or various programs
# that require network functionality will fail.
# 127.0.0.1 pc1.com pc1 localhost.localdomain localhost
192.168.0.1 pc1 pc1.com
192.168.0.2 pc2 pc2.com
192.168.0.3 pc3 pc3.com
192.168.0.2 dns2
Then I edit /etc/named.conf file as :-
## named.conf - configuration for bind
#
# Generated automatically by bindconf, alchemist et al.
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
include "/etc/rndc.key";
options {
directory "/var/named/";
};
zone "." {
type hint;
file "named.ca";
zone "pc2.com" IN {
type master;
file "pc2.zone";
};
Then I create pc2.zone file at /var/named/pc2.zone as :-
@ IN SOA dns2.pc2.com root.pc2.com. (
1 ; Serial
10800 ; refresh
3600 ; retry
604800 ; expire
86400 ; minimum
)
IN NS dns2.pc2.com
IN A 192.168.0.2
IN MX 5 dns2.pc2.com
Dns1 IN A 192.168.0.1
Dns1 IN MX dns1.pc1.com
;
www IN CNAME dns2
proxy IN CNAME dns2
mail IN CNAME dns2
smtp IN CNAME dns2
Then I create pc2.rev file at /var/named/pc2.rev file as :-
IN SOA dns2.pc2.com root.pc2.com. (
1 ; Serial
10800 ; refresh
3600 ; retry
604800 ; expire
86400 ; minimum
)
@ IN NS dns2.pc2.com
1 IN PTR dns2.pc2.com
2 IN PTR dns1.pc1.com
I still have the file localhost.zone at /var/named as :-
$TTL 86400
@ IN SOA @ root.localhost (
1 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
@ IN NS localhost.
@ IN A 127.0.0.1
I have named.local file also at /var/named as :-
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
and also another file named.ca at /var/named directory.
Now when I type nslookup the prompt come ..
when I type "server" it says...
Default server: 192.168.0.2
Address: 192.168.0.2#53
What things I have to do more to complete DNS configuration..
Please help me.....