LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-26-2013, 02:13 AM   #1
Rafael25
Member
 
Registered: Jul 2012
Posts: 53

Rep: Reputation: Disabled
www entry in bind9 on debian not working


Hi,

I am trying to set the bind on my dabian machin.
I can access mydomain.com but i cannot access www.mydaomin.com.

Here is my entire settings:

1) Set the forwarders in /etc/bind/named.conf.options:
Quote:
forwarders {
12.13.14.15;
};
2) Make the domain entry and reverse DNS Entry in /etc/bind/named.conf.local file :
Quote:
zone "mydomain.com" {
type master;
file "/etc/bind/db.mydomain.com";
};

zone "14.13.12.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.12";
};
3) Make my domain .db file /etc/bind/db.mydomain.com :
Quote:
$TTL 14400
@ 86400 IN SOA ns1.mydomain.com. root.mydomain.com. (
2013101502 ; serial, todays date+todays
86400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds

mydomain.com. IN NS ns1.example.com.
mydomain.com. IN NS ns2.example.com.

ns1 IN A 12.13.14.15

ns2 IN A 12.13.14.15


mydomain.com. IN A 12.13.14.15

localhost.mydomain.com. IN A 127.0.0.1

mydomain.com. IN MX 0 mydomain.com.

www IN CNAME mydomain.com.
ftp IN A 12.13.14.15
test IN CNAME mydomain.com.
4) Make the reverse domain file /etc/bind/12.db :
Quote:
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.mydomain.com root.mydomain.com (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.
10 IN PTR mydomain.com.
11 IN PTR www.mydomain.com.
12 IN PTR test.mydomain.com.
5) Here is the changes made in /etc/default/bind9
Quote:
# run resolvconf?
RESOLVCONF=yes

# startup options for the server
OPTIONS="-4 -u bind"

6) Here is my system log after restarting the service:
Quote:

Oct 26 07:09:18 (none) named[5170]: zone 0.in-addr.arpa/IN: loaded serial 1
Oct 26 07:09:18 (none) named[5170]: zone 127.in-addr.arpa/IN: loaded serial 1
Oct 26 07:09:18 (none) named[5170]: zone 255.in-addr.arpa/IN: loaded serial 1
Oct 26 07:09:18 (none) named[5170]: zone 14.13.12.in-addr.arpa/IN: loaded serial 1
Oct 26 07:09:18 (none) named[5170]: zone mydomain.com/IN: loaded serial 2013101502
Oct 26 07:09:18 (none) named[5170]: zone localhost/IN: loaded serial 2
Oct 26 07:09:18 (none) named[5170]: managed-keys-zone ./IN: loaded serial 2
Oct 26 07:09:18 (none) named[5170]: zone mydomain.com/IN: sending notifies (serial 2013101502)
Oct 26 07:09:18 (none) named[5170]: running
Oct 26 07:09:29 (none) named[5170]: success resolving 'ns2.example.com/AAAA' (in 'example.com'?) after reducing the advertised EDNS UDP packet size to 512 octets

Still I cannot access www.mydomain.com.
What am I missing?
Thanks in advance.

Last edited by Rafael25; 10-26-2013 at 02:14 AM.
 
Old 10-26-2013, 07:58 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,906

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Did you increase the serial after adding the www RR?
 
Old 10-26-2013, 08:15 AM   #3
Rafael25
Member
 
Registered: Jul 2012
Posts: 53

Original Poster
Rep: Reputation: Disabled
Yes i have increase the PTR
Quote:


@ IN NS ns.
10 IN PTR mydomain.com.
11 IN PTR www.mydomain.com.
12 IN PTR test.mydomain.com.
 
Old 10-26-2013, 09:38 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,906

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Quote:
Originally Posted by Rafael25 View Post
Yes i have increase the PTR
Not the PTR. The serial number (2013101502).
Change it to 2013102601 and reload bind.
 
Old 10-28-2013, 03:17 AM   #5
Rafael25
Member
 
Registered: Jul 2012
Posts: 53

Original Poster
Rep: Reputation: Disabled
I have change the serial number but still not working.
I have to increment serial number every time when i make any changes in that file?
Serial no of domain and reverse entry file should be same?
 
Old 10-28-2013, 04:08 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,906

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Quote:
I have to increment serial number every time when i make any changes in that file?
Yes and reload bind

Quote:
Serial no of domain and reverse entry file should be same?
Of course no. You increase the serial in a zonefile when you do changes in that zone. If you don't change something in the reverse zone, you don't have to change its serial.

Quote:
I have change the serial number but still not working.
Did you reload/restart the service?
What gives
Code:
dig www.mydomain.com @12.13.14.15
 
Old 10-28-2013, 04:30 AM   #7
Rafael25
Member
 
Registered: Jul 2012
Posts: 53

Original Poster
Rep: Reputation: Disabled
Here is the output of dig www.mydomain.com @12.13.14.15

Quote:

; <<>> DiG 9.8.1-P1 <<>> www.mydomain.com @12.13.14.15
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55722
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;www.mydomain.com. IN A

;; ANSWER SECTION:
www.mydomain.com. 604800 IN A 12.13.14.15

;; AUTHORITY SECTION:
mydomain.com. 604800 IN NS ns.mydomain.com.

;; ADDITIONAL SECTION:
ns.mydomain.com. 604800 IN A 12.13.14.15

;; Query time: 165 msec
;; SERVER: 12.13.14.15#53(12.13.14.15)
;; WHEN: Mon Oct 28 09:28:58 2013
;; MSG SIZE rcvd: 86
 
Old 10-28-2013, 04:53 AM   #8
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,906

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Quote:
;; ANSWER SECTION:
www.mydomain.com. 604800 IN A 12.13.14.15
So it works...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bind9 on debian JJX Debian 3 04-11-2013 02:10 PM
bind9: example.com works, www.example.com doesnt, and how to block urls Shwick Linux - Server 6 09-12-2011 12:26 AM
Bind9 all *.domain.com reachable, only www.domain.com isn't TonyDeWittePony Linux - Server 1 07-14-2011 01:03 PM
BIND9 and Debian cshiers Linux - Newbie 15 11-10-2010 01:52 PM
is my bind9 on debian box vulnerable? mvidberg Linux - Security 4 08-01-2008 11:37 PM


All times are GMT -5. The time now is 11:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration