LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-05-2009, 08:29 AM   #1
thamkhaohochoi
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
Help me configure BIND on LAN and WAN ?


People take some time to guide them how to configure BIND in LAN and WAN. Requirements of children: IP 113.134.x.100 province, domain names they bought at pavietnam. My distro is Centos 5.3

Domain thunghiem.com can run both in LAN and WAN network

/var/named/chroot/etc/named.conf
Quote:

//
// 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 { 127.0.0.1; };
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";

// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;

allow-query { localhost; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

view "internal" {
match-clients { localnets; };
match-destinations { localnets; };
recursion yes;
include "/etc/named.rfc1912.zones";
include "/var/named/chroot/var/named/named.thunghiem.com.zone";
};

view "external" {
match-clients { any; };
match-destinations { any; };
recursion no;
include "/var/named/chroot/var/named/named.thunghiem.com.zone.wan;"
/var/named/chroot/etc/named.thunghiem.com.zone
Quote:
zone "phimtambay.com" {
type master;
file "thunghiem.com.db";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "1.168.192.in-addr.arpa.db";
};
/var/named/chroot/etc/named.thunghiem.com.zone.wan
zone "thunghiem.com" {
type master;
file "thunghiem.com.db.wan";
allow-query { any; };
};

/var/named/chroot/var/named/thunghiem.com.db
Quote:
$TTL 86400
@ IN SOA thunghiem.com. root.thunghiem.com.(
2009080590 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS thunghiemy.com.
IN MX 10 thunghiem.com.
@ IN A 192.168.1.20
* IN A 192.168.1.20
/var/named/chroot/var/named/1.168.192.in-addr.arpa.db
Quote:
$TTL 86400
@ IN SOA thunghiem.com. root. thunghiem.com.(
20090805901 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS thunghiem.com.
20 IN PTR thunghiem.com.
vi /var/named/chroot/var/named/thunghiem.com.db.wan
Quote:
$TTL 86400
@ IN SOA mail.thunghiem.com. root.thunghiem.com(
2006041401 ; Serial
7200 ; Refresh
7200 ; Retry
2419200 ; Expire
86400 ) ; Minimum
IN NS mail.thunghiem.com. 
IN MX 10 thunghiem.com.
mail IN A X.X.X.X 
@ IN A X.X.X.X 
www IN A X.X.X.X 
ftp IN A X.X.X.X
mail IN A X.X.X.X 
thunghiem.com IN TXT "v=spf1 a mx ~all"
X.X.X : IP Public

/etc/init.d/named start
Quote:
Starting named:
Error in named configuration:
/etc/named.conf:41: open: /var/named/chroot/var/named/named.thunghiem.com.zone: file not found
[FAILED]
When I start named error file not found, although this file has links /var/named/chroot/var/named . I based this document to configure the [url] hxxp://centossrv.com/bind-centos5.shtml [/ url]

Sorry my english
 
Old 08-05-2009, 11:06 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,167
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
You're running named chrooted to /var/named/chroot directory, so according to your named.conf the absolute path for the zone file is:
/var/named/chroot/var/named/chroot/var/named/named.thunghiem.com.zone
I guess this is not what you want and that's why named complains that it cannot find it. The correct argument to the include statement should be:
Quote:
include "/var/named/named.thunghiem.com.zone";
 
  


Reply



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
LAN cannot access other LAN systems, only WAN Myrion Linux - Networking 1 09-06-2007 07:29 PM
2 wan and 1 lan xplozia Linux - Networking 3 02-06-2007 07:48 PM
Lan with three WAN... tusher Linux - Networking 3 06-28-2006 02:01 PM
LAN but no WAN BCarey Linux - Networking 4 05-07-2006 12:24 PM
Routing LAN -> WAN -> LAN with unhelpful router synx13 Linux - Networking 2 06-14-2004 02:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration