Addon domains not resolving, named.conf buggered

shadda

Registered
Nov 28, 2005
2
0
151
I'm trying to solve a problem for my client.

We, the host, (I'll refer to us as host.com), provide the client (client.com) with a reseller package.

This allows him to make use of cpanel's addon domains.
Now, when he adds a domain, it won't resolve. In fact, there is no IN A record for the domain at all on lookup.

I've added the domain belong2.us to his account using this feature. I've checked the belong2.us.db file in /var/named and it is accurate, I've also reloaded named several times.

I've run dig belong2.us and I get the same problem with every addon domain:

Gluttony:/etc/bind# dig belong2.us

; <<>> DiG 9.3.1 <<>> belong2.us
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 15195
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;belong2.us. IN A

;; Query time: 205 msec
;; SERVER: 67.21.13.2#53(67.21.13.2)
;; WHEN: Mon Nov 28 03:16:33 2005
;; MSG SIZE rcvd: 28


The IN A record is blank/nonexistant, yet these are very clearly defined in the named entry for it. I've checked all other files and they seem to be correct (and yes, there is a zone for it in /etc/named)

named-checkzone /var/named/belong2.us.db comes up ok, but the same command for client.com and host.com come up with the following:

zone belong2.us/IN: has no NS records


I'm at a loss for what could possibly be wrong here.
 

linuxrouter

Member
Nov 10, 2005
5
0
151
The first two things I would try is as follows.

Stop bind and start it with `named -d9`

This starts it in debug mode. View named.run in the current directory and it may give you a clearer view as to what the issue is.

Next, verify that the zone was added to a place that named is looking. I have noticed that CPanel uses the -t flag to specify a custom directory for named.

Otherwise, if you could post a copy of your zone file I can look at it.
 

shadda

Registered
Nov 28, 2005
2
0
151
I managed to get it sorted...
It seems cpanel hijacks named and runs chroot.

Not only that, but the zone files being created by cpanel were hideously flawed (checkzone wouldn't even validate them. Once I rewrote it by hand the domain worked.) I had to patch the zone template and remove/readd every domain.

This is a brand new cpanel install, so perhaps some one should look into the packaged zone file, it was very strange (things like the account owner's username was floating around in the SOA)