LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   DNS Server (https://www.linuxquestions.org/questions/linux-server-73/dns-server-4175419705/)

Viswajith 08-01-2012 03:23 AM

DNS Server
 
I Want to set DNS Sever in RHEL5 for mail server..I did by seeing many documents its not config...i thing am doing mistake somewhere...plz send me how to config DNS server and how we have to write MX records...

acid_kewpie 08-01-2012 04:30 AM

we really can't comment any more than the many many documents out there already go over this. If you are having a specific issue, please provide information about it and we can help you no problem.

fenice 08-02-2012 07:09 AM

Quote:

Originally Posted by Viswajith (Post 4742923)
I Want to set DNS Sever in RHEL5 for mail server..I did by seeing many documents its not config...i thing am doing mistake somewhere...plz send me how to config DNS server and how we have to write MX records...

If this is for your Zimbra server then you'll find information on the Zimbra wiki on how to configure the DNS records for a mail server. ;)

jsaravana87 08-03-2012 12:38 AM

Hi ,
I had pasted my Dns configuartion in centos 5.4 version with mx record



Quote:

root@bmw # cat /var/named/chroot/etc/named.caching-nameserver.conf

Line no 15,27,28,28,37,38 # disable
Quote:


Copy line number 21 to 31 and paste it below
[root@bmw ~]# cat /var/named/chroot/etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
type hint;
file "named.ca";
};

zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};

zone "example.com" IN {
type master;
file "domain.for";
allow-update { none; };
};

zone "1.200.10.in-addr.arpa" IN {
type master;
file "domain.rev";
allow-update { none; };
};



zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
[root@bmw ~]# vi /var/named/chroot/etc/named.rfc1912.zones
Quote:

[root@bmw ~]# cat /var/named/chroot/etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
type hint;
file "named.ca";
};

zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};

zone "example.com" IN {
type master;
file "domain.for";
allow-update { none; };
};

zone "1.200.10.in-addr.arpa" IN {
type master;
file "domain.rev";
allow-update { none; };
};


zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
Quote:

[root@bmw ~]# cat /var/named/chroot/etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
type hint;
file "named.ca";
};

zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};

zone "example.com" IN {
type master;
file "domain.for";
allow-update { none; };
};

zone "1.200.10.in-addr.arpa" IN {
type master;
file "domain.rev";
allow-update { none; };
};


zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
[root@bmw ~]#


Quote:

[root@bmw ~]# cd /var/named/chroot/var/named/
[root@bmw named]# vi domain.for
[root@bmw named]# cat domain.for
$TTL 86400
@ IN SOA bmw.example.com. root.bmw.example.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS bmw.example.com.
bmw.example.com. IN A 10.200.1.53
Quote:

[root@bmw named]# cat domain.rev
$TTL 86400
@ IN SOA bmw.example.com. root.bmw.example.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS bmw.example.com.
53 IN PTR bmw.example.com.
[root@bmw named]# cat /etc/resolv.conf
search example.com
nameserver 10.200.1.53
nameserver XX.XX.XX.XX
[root@bmw named]#
Quote:

[root@bmw named]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
10.200.1.53 bmw.example.com bmw
Quote:

[root@bmw named]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=bmw.example.com
Quote:

cd /var/named/chroot/var/named
chmod 644 domain.for
chmod 644 domain.rev

Quote:

[root@bmw ~]# dig mx example.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> mx example.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22094
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 11

;; QUESTION SECTION:
;example.com. IN MX

;; AUTHORITY SECTION:
com. 45411 IN NS l.gtld-servers.net.
com. 45411 IN NS m.gtld-servers.net.
com. 45411 IN NS a.gtld-servers.net.
com. 45411 IN NS b.gtld-servers.net.
com. 45411 IN NS c.gtld-servers.net.
com. 45411 IN NS d.gtld-servers.net.
com. 45411 IN NS e.gtld-servers.net.
com. 45411 IN NS f.gtld-servers.net.
com. 45411 IN NS g.gtld-servers.net.
com. 45411 IN NS h.gtld-servers.net.
com. 45411 IN NS i.gtld-servers.net.
com. 45411 IN NS j.gtld-servers.net.
com. 45411 IN NS k.gtld-servers.net.

;; ADDITIONAL SECTION:
a.gtld-servers.net. 158542 IN A 192.5.6.30
a.gtld-servers.net. 125279 IN AAAA 2001:503:a83e::2:30
d.gtld-servers.net. 98689 IN A 192.31.80.30
e.gtld-servers.net. 169389 IN A 192.12.94.30
f.gtld-servers.net. 6395 IN A 192.35.51.30
g.gtld-servers.net. 98689 IN A 192.42.93.30
h.gtld-servers.net. 103523 IN A 192.54.112.30
i.gtld-servers.net. 20118 IN A 192.43.172.30
j.gtld-servers.net. 19264 IN A 192.48.79.30
k.gtld-servers.net. 42345 IN A 192.52.178.30
l.gtld-servers.net. 158542 IN A 192.41.162.30

;; Query time: 9 msec
;; SERVER: 202.71.144.67#53(202.71.144.67)
;; WHEN: Mon Oct 31 06:46:36 2011
;; MSG SIZE rcvd: 437


Quote:

#vi domain.for

bmw IN A 10.200.1.53
IN MX 10 mail.example.com.

acid_kewpie 08-03-2012 01:37 AM

OK, so what do you want help with? Helps if you actually ask a question.


All times are GMT -5. The time now is 01:30 AM.