don_will

Well-Known Member
Jun 26, 2007
62
0
56
Cpanel
I have a DNS prob

dig mizoweb.net @127.0.0.1
; <<>> DiG 9.3.3rc2 <<>> mizoweb.net @127.0.0.1
; (1 server found)
;; global options: printcmd
;; connection timed out; no servers could be reached
my dns cannot resolved this is what i get when i dig it. its been three days when i create an account for this domain .. DNS bind A record show no error ... i have checked named.conf also everythings there...please help

nslookup mizoweb.net
;; Got SERVFAIL reply from 202.14.67.4, trying next server
Server: 202.14.67.14
Address: 202.14.67.14#53

** server can't find mizoweb.net: SERVFAIL
nslookup mizoweb.net @ns1.fartuah.net
nslookup: couldn't get address for '@ns1.fartuah.net': failure
I running on CENTOS Enterprise 5 i686
 
Last edited:

don_will

Well-Known Member
Jun 26, 2007
62
0
56
Cpanel
Here is my named.conf don't no how to do what you've said

include "/etc/rndc.key";

controls {
inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
};


options
{
/* make named use port 53 for the source of all queries, to allow
* firewalls to block all ports except 53:
*/
query-source port 53;

// Put files that named is allowed to write in the data/ directory:
directory "/var/named"; // the default
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
memstatistics-file "data/named_mem_stats.txt";
};

logging
{
/* If you want to enable debugging, eg. using the 'rndc trace' command,
* named will try to write the 'named.run' file in the $directory (/var/named).
* By default, SELinux policy does not allow named to modify the /var/named directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file "data/named.run";
severity dynamic;
};
};


// All BIND 9 zones are in a "view", which allow different zones to be served
// to different types of client addresses, and for options to be set for groups
// of zones.
//
// By default, if named.conf contains no "view" clauses, all zones are in the
// "default" view, which matches all clients.
//
// If named.conf contains any "view" clause, then all zones MUST be in a view;
// so it is recommended to start off using views to avoid having to restructure
// your configuration files in the future.

view "localhost_resolver"
{
/* This view sets up named to be a localhost resolver ( caching only nameserver ).
* If all you want is a caching-only nameserver, then you need only define this view:
*/
* If all you want is a caching-only nameserver, then you need only define this view:
*/
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;

zone "." IN {
type hint;
file "/var/named/named.ca";
};

/* these are zones that contain definitions for all the localhost
* names and addresses, as recommended in RFC1912 - these names should
* ONLY be served to localhost clients:
*/
include "/var/named/named.rfc1912.zones";
};

view "internal"
{
/* This view will contain zones you want to serve only to "internal" clients
that connect via your directly attached LAN interfaces - "localnets" .
*/
match-clients { localnets; };
match-destinations { localnets; };
recursion yes;

zone "." IN {
type hint;
file "/var/named/named.ca";
};

// include "/var/named/named.rfc1912.zones";
// you should not serve your rfc1912 names to non-localhost clients.

// These are your "authoritative" internal zones, and would probably
// also be included in the "localhost_resolver" view above :
};

view "external"
{
/* This view will contain zones you want to serve only to "external" clients
* that have addresses that are not on your directly attached LAN interface subnets:
*/
match-clients { !localnets; !localhost; };
match-destinations { !localnets; !localhost; };

recursion no;
// you'd probably want to deny recursion to external clients, so you don't
// end up providing free DNS service to all takers
// end up providing free DNS service to all takers

// all views must contain the root hints zone:
zone "." IN {
type hint;
file "/var/named/named.ca";
};

// These are your "authoritative" external zones, and would probably
// contain entries for just your web and mail servers:

// BEGIN external zone entries


zone "irc.mizofa.net" {
type master;
file "/var/named/irc.mizofa.net.db";
};

zone "fartuah.net" {
type master;
file "/var/named/fartuah.net.db";
};


zone "mizoweb.net" {
type master;
file "/var/named/mizoweb.net.db";
};

zone "anopequotes.org" {
type master;
file "/var/named/anopequotes.org.db";
};

zone "othersyde-inc.com" {
type master;
file "/var/named/othersyde-inc.com.db";
};

zone "zawlbukrealestate.com" {
type master;
file "/var/named/zawlbukrealestate.com.db";
};

zone "irc.mizoweb.net" {
type master;
file "/var/named/irc.mizoweb.net.db";
};


zone "ns1.fartuah.net" {
type master;
file "/var/named/ns1.fartuah.net.db";
};

zone "ns2.fartuah.net" {
type master;
file "/var/named/ns2.fartuah.net.db";
};
};
 

Todd Mitchell

Well-Known Member
Staff member
Nov 13, 2006
301
1
243
Houston, TX
Copy your named.conf to a backup, then paste the named.conf below and restart named '/etc/init.d/named restart' And you should be good to go.


Code:
include "/etc/rndc.key";

controls {
inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
};


options
{
/* make named use port 53 for the source of all queries, to allow
* firewalls to block all ports except 53:
*/
query-source port 53;
recursion no;

// Put files that named is allowed to write in the data/ directory:
directory "/var/named"; // the default
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
memstatistics-file "data/named_mem_stats.txt";
};

logging
{
/* If you want to enable debugging, eg. using the 'rndc trace' command,
* named will try to write the 'named.run' file in the $directory (/var/named).
* By default, SELinux policy does not allow named to modify the /var/named directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file "data/named.run";
severity dynamic;
};
};


// All BIND 9 zones are in a "view", which allow different zones to be served
// to different types of client addresses, and for options to be set for groups
// of zones.
//
// By default, if named.conf contains no "view" clauses, all zones are in the
// "default" view, which matches all clients.
//
// If named.conf contains any "view" clause, then all zones MUST be in a view;
// so it is recommended to start off using views to avoid having to restructure
// your configuration files in the future.

/* This view will contain zones you want to serve only to "external" clients
* that have addresses that are not on your directly attached LAN interface subnets:
*/
// you'd probably want to deny recursion to external clients, so you don't
// end up providing free DNS service to all takers
// end up providing free DNS service to all takers

// all views must contain the root hints zone:
zone "." IN {
type hint;
file "/var/named/named.ca";
};

// These are your "authoritative" external zones, and would probably
// contain entries for just your web and mail servers:

// BEGIN external zone entries


zone "irc.mizofa.net" {
type master;
file "/var/named/irc.mizofa.net.db";
};

zone "fartuah.net" {
type master;
file "/var/named/fartuah.net.db";
};


zone "mizoweb.net" {
type master;
file "/var/named/mizoweb.net.db";
};

zone "anopequotes.org" {
type master;
file "/var/named/anopequotes.org.db";
};

zone "othersyde-inc.com" {
type master;
file "/var/named/othersyde-inc.com.db";
};

zone "zawlbukrealestate.com" {
type master;
file "/var/named/zawlbukrealestate.com.db";
};

zone "irc.mizoweb.net" {
type master;
file "/var/named/irc.mizoweb.net.db";
};


zone "ns1.fartuah.net" {
type master;
file "/var/named/ns1.fartuah.net.db";
};

zone "ns2.fartuah.net" {
type master;
file "/var/named/ns2.fartuah.net.db";
};
 

don_will

Well-Known Member
Jun 26, 2007
62
0
56
Cpanel
everythings fine now ... thankyou so much for giving me you precious time ... don't know how much to thank you ... thanks so much
 

chris10121

Registered
Aug 11, 2007
1
0
51
omg mine works too now :) I've been looking for 2 days trying to find a way to fix the same problem.

One question, in the comments it says "you'd probably want to deny recursion to external clients, so you don't end up providing free DNS service to all takers", that is taken care of in options right where you added "recursion no;" ?
 

canfone

Active Member
Verifed Vendor
Aug 15, 2003
26
0
151
Montreal
CentOS 5 issue

Everytime we setup a CentOS 5 VPS and install cPanel we get this issue... the above named.conf format without the internal/external zones does fix this issue... I am wondering if this is a cPanel bug or why the named.conf needs to be altered?
 

rexrjacob

Member
Mar 25, 2006
23
0
151
Copy your named.conf to a backup, then paste the named.conf below and restart named '/etc/init.d/named restart' And you should be good to go.


Code:
include "/etc/rndc.key";

controls {
inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
};


options
{
/* make named use port 53 for the source of all queries, to allow
* firewalls to block all ports except 53:
*/
query-source port 53;
recursion no;

// Put files that named is allowed to write in the data/ directory:
directory "/var/named"; // the default
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
memstatistics-file "data/named_mem_stats.txt";
};

logging
{
/* If you want to enable debugging, eg. using the 'rndc trace' command,
* named will try to write the 'named.run' file in the $directory (/var/named).
* By default, SELinux policy does not allow named to modify the /var/named directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file "data/named.run";
severity dynamic;
};
};


// All BIND 9 zones are in a "view", which allow different zones to be served
// to different types of client addresses, and for options to be set for groups
// of zones.
//
// By default, if named.conf contains no "view" clauses, all zones are in the
// "default" view, which matches all clients.
//
// If named.conf contains any "view" clause, then all zones MUST be in a view;
// so it is recommended to start off using views to avoid having to restructure
// your configuration files in the future.

/* This view will contain zones you want to serve only to "external" clients
* that have addresses that are not on your directly attached LAN interface subnets:
*/
// you'd probably want to deny recursion to external clients, so you don't
// end up providing free DNS service to all takers
// end up providing free DNS service to all takers

// all views must contain the root hints zone:
zone "." IN {
type hint;
file "/var/named/named.ca";
};

// These are your "authoritative" external zones, and would probably
// contain entries for just your web and mail servers:

// BEGIN external zone entries


zone "irc.mizofa.net" {
type master;
file "/var/named/irc.mizofa.net.db";
};

zone "fartuah.net" {
type master;
file "/var/named/fartuah.net.db";
};


zone "mizoweb.net" {
type master;
file "/var/named/mizoweb.net.db";
};

zone "anopequotes.org" {
type master;
file "/var/named/anopequotes.org.db";
};

zone "othersyde-inc.com" {
type master;
file "/var/named/othersyde-inc.com.db";
};

zone "zawlbukrealestate.com" {
type master;
file "/var/named/zawlbukrealestate.com.db";
};

zone "irc.mizoweb.net" {
type master;
file "/var/named/irc.mizoweb.net.db";
};


zone "ns1.fartuah.net" {
type master;
file "/var/named/ns1.fartuah.net.db";
};

zone "ns2.fartuah.net" {
type master;
file "/var/named/ns2.fartuah.net.db";
};


Thanks buddy. your named.conf fixed my issue... u rock
 

cYbErDaRk

Member
Jan 9, 2004
15
0
151
Madrid - Europe
Four hours searching the net and the answer was here... many thanks again from another lost user :)

BTW, could this "manual" configuration be altered automatically by any cpanel update?
 

istdizayn

Registered
Oct 24, 2007
1
0
51
hi ;
setuped named.conf for this code but
doesn't connect server ( centos 5 - Latest version )

http://dns-tools.domaintools.com/?q=istdizayn.net&m=dns

checking domain --

;; Answer received from 216.145.1.3 (31 bytes)
;;
;; HEADER SECTION
;; id = 1480
;; qr = 1 opcode = QUERY aa = 0 tc = 0 rd = 1
;; ra = 1 ad = 0 cd = 0 rcode = SERVFAIL
;; qdcount = 1 ancount = 0 nscount = 0 arcount = 0

;; QUESTION SECTION (1 record)
;; istdizayn.net. IN A

;; ANSWER SECTION (0 records)
;; AUTHORITY SECTION (0 records)
;; ADDITIONAL SECTION (0 records)
 

Snowman30

Well-Known Member
PartnerNOC
Apr 7, 2002
679
0
316
cPanel Access Level
DataCenter Provider
I k now this is an older post but im having this same issue on a new server we just setup

problem is everytime i overwrite named.conf something automatically reversta it back to the old version

anyone have any ideas whats going on there?
 

Midnight_Hacker

Registered
Sep 9, 2007
3
0
51
Sleuth on the Trail....

Snowman30 you are not alone. I am tracking down the source. I know the file is overwritten whenever upcp runs. I need to file the template file that builds the named.conf file and change a couple of lines for the 'external' zone.

I think most people having this problem are like myself and not on a full class C subnet. And this is what is causing the !localnets not to work properly.

M. H.

I k now this is an older post but im having this same issue on a new server we just setup

problem is everytime i overwrite named.conf something automatically reversta it back to the old version

anyone have any ideas whats going on there?
 

wokman

Registered
Sep 2, 2005
1
0
151
These lines in your external view are the most likely suspect.

match-clients { !localnets; !localhost; };
match-destinations { !localnets; !localhost; };

Seen this on other CentOS5 systems.

Read this post for more details. http://forums.powervps.com/showthread.php?p=19984

Try running /scripts/fixnamedviews might solve your problem.

WW