LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-29-2012, 07:33 AM   #1
druisgod
Member
 
Registered: Jun 2004
Location: Maine
Distribution: LFS Mint OS, LFS, CENTos,
Posts: 117

Rep: Reputation: 18
Issue with Bind resolution


Hi. I have a server that I am running bind with two seperate zones on. I am using apache to serve up a website and would like the users to be able to go to "hostname.network.lan/websitename" and the .lan part isn't getting resolved. In other words, I can browse to hostname.network/websitename just fine, but hostname.network.lan/websitename give a "server not found" error.

Here is the internal zone file:
Code:
$TTL 86400
@   IN  SOA     linserv2.internal.lan. root.internal.lan.(
        2011071002  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)


        IN  NS      linserv2.internal.lan.
        IN  MX 10   linserv2.internal.lan.


linserv2     IN  A       172.31.100.254
bob	     IN	 A	172.31.100.5
and the named.conf file:

Code:
options {

#listen-on port 53 { 127.0.0.1; };

listen-on-v6 { none; };

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";

allow-query { localhost;172.31.100.0/24;};

recursion yes;

};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};


view "internal" {
        match-clients {
                localhost;
                172.31.100.0/24;
        };
        zone "." IN {
                type hint;
                file "named.ca";
        };
        zone "internal" IN {
                type master;
                file "internal.lan";
                allow-update { none; };
        };
        zone "0.31.172.in-addr.arpa" IN {
                type master;
                file "0.31.172.db";
                allow-update { none; };
        };
include "/etc/named.rfc1912.zones";
};
view "external" {
        match-clients { any; };
        allow-query { any; };
        recursion no;
        zone "external" IN {
                type master;
                file "external.wan";
                allow-update { none; };
        };
        zone "0.168.192.in-addr.arpa" IN {
                type master;
                file "0.168.192.db";
                allow-update { none; };
        };
};
My resolv.conf:

Code:
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
search internal.lan
nameserver	172.31.100.254
 
Old 02-29-2012, 07:40 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,009
Blog Entries: 5

Rep: Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787Reputation: 787
Your zone names are wrong in named.conf. You have "internal" but it should be "internal.lan", "external" but it should be "external.wan". You have specified those as file names but it is the zone name not the file name that determines what is being served by BIND. (That is to say you could name your file billybob so long as the zone name was internal.lan and it would work, assuming you had the file billybob.)
 
1 members found this post helpful.
Old 02-29-2012, 07:47 AM   #3
druisgod
Member
 
Registered: Jun 2004
Location: Maine
Distribution: LFS Mint OS, LFS, CENTos,
Posts: 117

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by MensaWater View Post
Your zone names are wrong in named.conf. You have "internal" but it should be "internal.lan", "external" but it should be "external.wan". You have specified those as file names but it is the zone name not the file name that determines what is being served by BIND. (That is to say you could name your file billybob so long as the zone name was internal.lan and it would work, assuming you had the file billybob.)
DOH! I didn't even see that! I thought the zone names in named.conf were arbitrary and used for organizational purposes and that the zone file's A records actually declared the name to be resolved. Thanks for the help!!!
 
1 members found this post helpful.
  


Reply

Tags
bind, configuration, dns, zone files


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
BIND Issue With Timeouts? cipher7836 Linux - Newbie 3 08-06-2009 08:59 AM
Bind issue reaky Linux - Server 1 04-22-2008 02:30 AM
Local name resolution with BIND rmarkin Linux - Software 1 02-16-2008 08:06 AM
BIND/DNS Host resolution problem Seventh Linux - Newbie 1 03-21-2007 03:38 PM
BIND DNS resolution problems dougz Linux - Networking 3 01-02-2006 02:31 PM


All times are GMT -5. The time now is 05:42 PM.

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