Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-17-2011, 03:25 PM
|
#1
|
LQ Newbie
Registered: Feb 2011
Posts: 10
Rep:
|
I have a problem to setup bind dns server
Hello
I have a problem to setup bind dns server
I have a system centos 5.5
[root@server etc]# cat named.conf
PHP Code:
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { 216.245.218.168; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
query-source port 53;
query-source-v6 port 53;
allow-query { 216.245.218.168; };
};
zone "r7l.org" IN {
type master;
file "r7l.org.forward";
allow-update { none; };
};
zone "218.245.216.in-addr.arpa" IN {
type master;
file "r7l.org.reverse";
allow-update { none; };
};
[root@server named]# cat r7l.org.forward
PHP Code:
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS @
IN A 216.245.218.168
IN AAAA ::1
[root@server named]# cat r7l.org.reverse
PHP Code:
$TTL 86400
@ IN SOA r7l.org. root.r7l.org. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS r7l.org.
168 IN PTR r7l.org.
PHP Code:
[root@server named]# nslookup 216.245.218.168
Server: 216.245.218.168
Address: 216.245.218.168#53
168.218.245.216.in-addr.arpa name = r7l.org.
[root@server named]# nslookup r7l.org
Server: 216.245.218.168
Address: 216.245.218.168#53
Name: r7l.org
Address: 216.245.218.168
Do not do Domain
www.r7l.org
http://www.intodns.com/r7l.org
Please help
|
|
|
03-17-2011, 03:44 PM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,217
|
Hi,
If you want to resolve www.r7l.org you need an A or CNAME record for it. E.g.
Code:
www IN A 216.245.218.168
|
|
|
03-17-2011, 03:45 PM
|
#3
|
Member
Registered: Feb 2011
Distribution: CentOS, Ubuntu
Posts: 97
Rep:
|
Looks like you need A and PTR records for www, ns1, and ns2.
|
|
|
03-17-2011, 05:18 PM
|
#4
|
LQ Newbie
Registered: Feb 2011
Posts: 10
Original Poster
Rep:
|
Quote:
Hi,
Quote:
Do not do Domain
www.r7l.org
If you want to resolve www.r7l.org you need an A or CNAME record for it. E.g.
Code:
|
how to setting CNAME record
where to put
Quote:
Looks like you need A and PTR records for www, ns1, and ns2.
|
how to setting PTR records
|
|
|
03-17-2011, 06:41 PM
|
#5
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,217
|
Quote:
www IN A 216.245.218.168
where to put
|
You add the A record in r7l.org.forward, increase the serial in the same file and reload bind
|
|
|
03-18-2011, 11:24 AM
|
#6
|
Member
Registered: Feb 2011
Distribution: CentOS, Ubuntu
Posts: 97
Rep:
|
Quote:
Originally Posted by dr-php
how to setting PTR records
|
If www is 216.245.218.168 then all you need is a CNAME record.
You already have a PTR record for this IP address.
However, if www is on another server, like 216.245.218.169 for example, then you'd add a line to the file r7l.org.reverse:
Code:
168 IN PTR r7l.org.
169 IN PTR www.r7l.org.
Remember to increment your serial number and restart named.
|
|
|
03-18-2011, 02:57 PM
|
#7
|
LQ Newbie
Registered: Feb 2011
Posts: 10
Original Poster
Rep:
|
cat r7l.org.forward
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS @
IN A 216.245.218.168
IN AAAA ::1
www IN A 216.245.218.168
|
|
|
03-18-2011, 02:58 PM
|
#8
|
LQ Newbie
Registered: Feb 2011
Posts: 10
Original Poster
Rep:
|
cat r7l.org.forward
PHP Code:
$TTL 86400 @ IN SOA @ root ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum
IN NS @ IN A 216.245.218.168 IN AAAA ::1 www IN A 216.245.218.168
cat r7l.org.reverse
PHP Code:
$TTL 86400 @ IN SOA r7l.org. root.r7l.org. ( 1997022700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS r7l.org. 168 IN PTR r7l.org. 168 IN PTR www.r7l.org.
Do not do Domain
www.r7l.org
Last edited by dr-php; 03-18-2011 at 03:01 PM.
|
|
|
03-18-2011, 04:12 PM
|
#9
|
Member
Registered: Feb 2011
Distribution: CentOS, Ubuntu
Posts: 97
Rep:
|
You can't have two A records like that; if you're using the same IP for two entries, one has to be an "alias" CNAME record and one has to be the "real" A record. You don't show your ORIGIN record, so assuming it's fubar.org:
Code:
$ORIGIN fubar.com.
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS ns1
@ IN NS ns2
fubar IN A 216.245.218.168
IN AAAA ::1
www IN CNAME fubar.com.
ns1 IN CNAME fubar.com.
ns2 IN CNAME fubar.com.
I also added the entries for ns1 and ns2, because the intodns link you posted was complaining about them.
You already have a PTR record for 216.245.218.168 so you don't need two; you can delete the PTR record for www. You only need PTR records for A records. DNS is smart enough to trace a CNAME record to its A record and use that PTR record.
|
|
|
03-18-2011, 05:15 PM
|
#10
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,217
|
@lrtward
Quote:
You can't have two A records like that; if you're using the same IP for two entries, one has to be an "alias" CNAME record and one has to be the "real" A record. Y
|
Says who? You can have as many A records you want pointing to the same IP. And it's better to use A instead of CNAME RRs, because you save one lookup.
@dr-php
Code:
cat r7l.org.forward
PHP Code:
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS @
IN A 216.245.218.168
IN AAAA ::1
www IN A 216.245.218.168
You didn't increase the serial (the number 42 in red). Make it 43 and reload bind
|
|
|
All times are GMT -5. The time now is 05:09 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|