PDA

View Full Version : BIND/DNS will not start named.conf.local file not found


MrCompTech
7th July 2010, 16:24
When I log in to the ISPConfig3 web console from my laptop on the same LAN and check the settings under

System --> Server Config --> DNS tab
BIND User : named
BIND Group : named
BIND zonefiles directory : /var/named
BIND named.conf path : /etc/named.conf
: /etc/named.conf.local

The last entry is "/etc/named.conf.local" does not have a label.

After I created the first zone ISPConfig3 did create the file /etc/named.conf.local.

Then when I tried to manually start BIND "/etc/init.d/named start"
I receive the error :

Error in named configuration:
/etc/named.conf:42: open: /etc/named.conf.local: file not found

ISPConfig3 created this file so why can't it find it?

If I cd to /etc and run "ls -l named*" to get a directory listing I get:
-rw-r----- 1 root named 964 Jul 7 08:33 named.conf
-rw-r--r-- 1 root named 964 Jul 7 08:33 named.conf.local
-rw-r--r--. 1 root named 964 Jul 7 08:33 named.iscdlv.key
-rw-r-----. 1 root named 964 Jul 7 08:33 named.rfc1912.zones

Notice the "." at the end of the permissions list.
What does this indicate and is the problem that the "named.conf.local" does not have a "." in the permissions list?

Also, since the ISPConfig3 configuration had the BIND owner and group as "named" I changed the group on the named.* files to "named" and tried to restart named but received the same error, named still will not start.

till
7th July 2010, 17:30
Which tutorial did you use to install your server?

MrCompTech
7th July 2010, 17:43
Hello,

I used "The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]".

borgo
7th July 2010, 19:52
Isnt't it the already known problem about config file paths in RedHat/Fedora/CentOS distros as stated in this thread
http://howtoforge.com/forums/showthread.php?t=46741 ?

borgo

till
7th July 2010, 20:09
No, thats unrelated. In the other thread, named has been reconfigured manually to run chrooted (/var/named/chroot/etc) while in this thread the normal install guide is used and that installs named without a chroot so that the config file is /etc/named.conf

Please post the content of the file /etc/named.conf

MrCompTech
7th July 2010, 20:31
Hi Till,

Here's my named.conf file:

//
// named.conf
//
// Provided by Red Hat bind 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.
//

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";
allow-query { localhost; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
};

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

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

include "/etc/named.rfc1912.zones";

include "/etc/named.conf.local";

MrCompTech
7th July 2010, 20:55
OK, well this is very odd.

I retyped the last line of the named.conf above the existing line using vim, exactly like the existing line.

include "/etc/named.conf.local";

then deleted the original line and now named starts!

But now I get a different error!

I had already used ISPConfig3 web interface to add a client, website and a domain.
The FQDN of the ISPConfig3 server is "prl-ofc-s01.mrcomptech.com" with an IP of 192.168.1.10
This server is behind a NATed cable modem.
There is only one public IP address.

The DNS service is only needed on the local LAN by a couple of PCs to query DNS for Internet as well as for web sites on the local ISPConfig3 web server, which all should resolve to 192.168.1.10

The website I was adding was "mrcomptech.com"

Starting named:
Error in named configuration:
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0. 0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0
zone mrcomptech.com/IN: has no NS records
zone mrcomptech.com/IN: not loaded due to errors.
_default/mrcomptech.com/IN: bad zone

I deleted the zone within ISPConfig3 but when I try to restart named it still finds the zone that doesn't show up in ISPConfig3.

MrCompTech
7th July 2010, 21:30
I deleted the pri.mrcomptech.com zone file manually from the server and deleted the contents of /etc/named.conf.local

I am going to delete all records related to the one client, website and dns that I created and try to start over with a 'new client'.

MrCompTech
7th July 2010, 23:58
I wanted to confirm that retyping the inclusion line for the named.conf.local is what fixed the problem so I restored the HD backup I made using "Clonezilla Live".

http://www.howtoforge.com/back-up-restore-hard-drives-and-partitions-with-clonezilla-live

Well it didn't work.

So I am still getting the error:

Error in named configuration:
/etc/named.conf:42: open: /etc/named.conf.local: file not found

Even though ISPConfig created this file.

But I did find something else out...

I commented out the inclusion line in named.conf and started the named service. I waited a few minutes then checked the server status and "MyDNS" showed green. Of course I can't use the system this way since my DNS information for the web sites is not being read!

Any ideas?

till
8th July 2010, 00:25
Do you have any Linux kernel security extensions like selinux enabled which might prevent that named can read the file?

MrCompTech
8th July 2010, 00:38
I followed the How-To for the perfect server F13 x86_64, so selinux should be disabled and there should be no rules in iptables.

...

I checked in /etc/selinux/config, SELINUX=disabled.

...

In iptables a rule is present for fail2ban-SSH. The install of fail2ban-SSH must have created this.

I even created /etc/named.glb and added an inclusion for it in /etc/named.conf and while commenting out the inclusion for named.conf.local I get an error stating that named.glb cannot be found!

I tried putting the inclusion lines that cause the error before the inclusion line for /etc/named.rfc1912.zones, which by the way does not cause an error, and still get the error.

I have tried chmod 777 on named.conf.local and still get the error.
I have chgrp and chown named named.conf.local and still get the error.

MrCompTech
8th July 2010, 00:46
Duplicate Removed

MrCompTech
8th July 2010, 18:57
Duplicate removed

MrCompTech
9th July 2010, 03:32
Following the How-to

http://howtoforge.org/perfect-server-fedora-13-x86_64-ispconfig-3

I started all over and received the same problem as before.

The DNS (named) service is not yet started.

After using ISPConfig3 web console to configure server IP, add client, add website and use DNS wizard to create zone record for the first web site the /etc/named.conf.local gets created by ISPConfig3 but when I try to restart the service it will not start because the inclusion file "/etc/named.conf.local" called for in "/etc/named.conf" cannot be found!

Another inclusion file "/etc/named.rfc1912.zones" is able to be read.

Geez this is not making sense, how can a file the is present not be able to be read? SELinux is disabled.

Anyone have any ideas?

theleech1
9th July 2010, 07:15
I am a complete novice and have my own problems as well in another thread.

But when I ran the tutorials they ask you to create the root user but not a special user "named" for the group "named" ro run bind.

I had to got and change the permissions to allow root to run these files "named" etc and I got past your problem into mine :(

Even if this does not help you exactly it might make you look at the problem from a different angle.

falko
9th July 2010, 11:21
Following the How-to

http://howtoforge.org/perfect-server-fedora-13-x86_64-ispconfig-3

I started all over and received the same problem as before.

The DNS (named) service is not yet started.

After using ISPConfig3 web console to configure server IP, add client, add website and use DNS wizard to create zone record for the first web site the /etc/named.conf.local gets created by ISPConfig3 but when I try to restart the service it will not start because the inclusion file "/etc/named.conf.local" called for in "/etc/named.conf" cannot be found!

Another inclusion file "/etc/named.rfc1912.zones" is able to be read.

Geez this is not making sense, how can a file the is present not be able to be read? SELinux is disabled.

Anyone have any ideas?
I guess BIND is running chrooted. What's the output of
updatedb
locate named.conf?

MrCompTech
9th July 2010, 17:40
Hi TheLeech1,

The How-to "The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]" (http://www.howtoforge.com/perfect-server-fedora-13-x86_64-ispconfig-3) doesn't include any instructions for creating or modifying the user "named".

Which How-To were you following?

Hi Falko,
After your comment I checked the list of software selected during page1 and 2 of the how-to. When it says to include the group "DNS Name Server" this group includes two software packages bind-chroot and unbound.

This is on page http://www.howtoforge.com/perfect-server-fedora-13-x86_64-ispconfig-3-p2.

But later on page http://www.howtoforge.com/perfect-server-fedora-13-x86_64-ispconfig-3-p5 step 17 it says:

yum install bind bind-utils

To find out what BIND related software is installed I ran

yum list installed bind*

It returned:

Installed Packages
bind.x86_64
bind-chroot.x86_64
bind-libs.x86_64
bind-utils.x86_64
the version for each is 32:9.7.1-1.fc13 from @updates

I ran the "updatedb" command then the "locate named.conf" as you requested.

Here is the result:

/etc/named.conf
/etc/named.conf.local
/usr/local/ispconfig/server/conf/bind_named.conf.local.master
/usr/share/doc/bind-9.7.1/named.conf.default
/usr/share/doc/bind-9.7.1/sample/etc/named.conf
/usr/share/man/man5/named.conf.5.gz
/var/named/chroot/etc/named.conf


The commands for installing both bind and bind-chroot have been run, both appear in the yum listing. Both are installed but it is not clear which I am actually running or perhaps both are running :(

What do I need to do to correct this?

MrCompTech
9th July 2010, 18:22
It looks like what I need to do is to start over, again, and this time during the software selection stage, Pg 1 or 2, of the How-To DESELECT "DNS Name Server" since that is explicitly installed later. This will mean running BIND as not chroot. If anyone knows any reasons of why this might not be a secure or good as running it as chrooted please post.

After the reinstall I'll post again so we know what happened :)

rbroomfield
9th July 2010, 18:46
Same issue and its bugging the hell out of me. Running 3 servers all vm's using ispconfig 2 no problem. I've tried all i can find and still no joy. grr still looking. Can anyone shed any light on this one... The file is THERE

MrCompTech
10th July 2010, 06:04
The default install of Fedora 13 under the category "DNS Name Server" has bind-chroot selected by default when you select the category has described in the How-To "The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]"

This would be fine if the remaining instructions did not include installing bind and did explain what to do to configure bind-chroot.

BIND is installed in step 17 "yum install bind bind-utils".

So what I did was to not select the "DNS Name Server" category during pg2 of the How-To. There is one other thing that needs done since the file named.conf.local does not yet exist and 'named' will not start without it and since we need it for ISPConfig3 we cannot comment out the inclusion line in named.conf for named.conf.local. -

cd /etc
echo > named.conf.local

This creates an empty file and now you can run :

/etc/init.d/named start

and it will start. Or reboot and named should start. You could also use ISPConfig to create the named.conf.local file by creating a zone then reboot your server.

Following these changes it worked, at least named started with no problem. I haven't gotten any furthur to see if there are any other problems.

I have also created a couple of scripts that take a lot of the pain and human error out of running the How-To "The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]" I will post them in another thread in this "ISPConfig3/Installation & Configuration" forum.

rbroomfield
10th July 2010, 11:49
I'll try it now. Thanks for helping us out here :-)

rbroomfield
10th July 2010, 14:22
well..... i've followed re-installed and got the same problem. This is crazy! why will it not work! please help:(

till
10th July 2010, 14:26
@rbroomfield:

Post the output of:

updatedb
locate named.conf

rbroomfield
10th July 2010, 14:28
[root@u1027 install]# updatedb
[root@u1027 install]# locate named.conf
/etc/named.conf
/etc/named.conf.local
/usr/local/ispconfig/server/conf/bind_named.conf.local.master
/usr/share/doc/bind-9.7.1/named.conf.default
/usr/share/doc/bind-9.7.1/sample/etc/named.conf
/usr/share/man/man5/named.conf.5.gz


Thanks for your help

rbroomfield
10th July 2010, 14:36
This is the error in the message.log


Starting named:
Error in named configuration:
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0. 0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0
zone exponentcms.co.uk/IN: NS 'ns1.exponentcms.co.uk' has no address records (A or AAAA)
zone exponentcms.co.uk/IN: NS 'ns2.exponentcms.co.uk' has no address records (A or AAAA)
zone exponentcms.co.uk/IN: not loaded due to errors.
_default/exponentcms.co.uk/IN: bad zone
[FAILED]

rbroomfield
10th July 2010, 14:44
Discovered this in the log as well....

Jul 10 12:25:32 u1027 named[16547]: managed-keys-zone ./IN: loading from master file /var/named/dynamic/managed-keys.bind failed: permission denied
Jul 10 12:25:32 u1027 named[16547]: /var/named/dynamic/managed-keys.bind.jnl: open: permission denied
Jul 10 12:25:32 u1027 named[16547]: managed-keys-zone ./IN: journal rollforward failed: unexpected error

These file do not exist either.......any clues?

Thanks in advance

MrCompTech
10th July 2010, 20:02
Hi rbroomfield,

I ran the updatedb and locate named.conf on my system and the output from the locate command looks exactly like your.

Running /etc/init.d/named restart does restart my DNS server with no errors, BUT I have not created any clients, web sites, email, or DNS Zones that's going to be next.

I have made almost no changes to the default install.

What I have changed is:
In /etc/named.conf:
Changed the 'listen-on' option to include my servers LAN IP
listen-on port 53 { 127.0.0.1; 192.168.1.10; };
Changed the 'allow-query' option to include my local LAN
allow-query {localhost; 192.168.1.0/24; }

At first boot after finishing the entire How-To for "The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]" named was NOT running.

I created an empty named.conf.local like so:
echo > /etc/named.conf.local

Then I started named:
/etc/init.d/named start

Then I logged in to the ISPConfig3 web admin from my laptop on the same local LAN.

Went to System --> Server Config --> (clicked on my server) --> Server tab
Corrected the Gateway Address to point to my cable modem
Corrected the Nameservers to point to my own server

Went to System --> Server Config --> (clicked on my server) --> DNS tab
Confirmed that the settigns matched the output of 'locate named.conf'

Logged out of the web admin, rebooted the server, logged back in to the server checked that named restarted ok, logged in to the ISPConfig3 web admin and checked the "Monitor" tab and all was green.

Next I am going to start adding a client and see what happens with the DNS I'll but that in my next post.

MrCompTech
10th July 2010, 20:54
Well rbroomfield, looks like I'm right there with ya!

================================================== ====================
Add first client, DNS, Email and Sites
================================================== ====================
Log in to ISPConfig3 web admin.
Click on "Client"
Click "Add New Client" button
Filled out info.
Used "mct_" as user name since I think that is used for logins under this client.
Did not change anything on the "Limits" tab.

Click on DNS tab
Under DNS Wizard click on Add DNS Zone
Selected client "mct_"
Domain: mrcomptech.com
IP Address: All my sites will be on the same server and since I am using named based virtual hosting all will have the same ip address.
NS 1 : prl-ofc-s01.mrcomptech.com, which is this ISPConfig3 server w/ DNS (BIND)
NS 2 : prl-ofc-s01.mrcomptech.com, Two are required but I only have one local DNS server
Email: mrcomptech at yahoo dot com

Click on Email tab
Click the "Add New Domain" button
Server: prl-ofc-s01
Client: "mct_"
Domain: mrcomptech.com
Spam Filter:Normal
Active: checked

Click on Sites tab
Click the "Add New Website" button
Server: prl-ofc-s01
Client: "mct_"
IP Address: 192.168.1.10
Domain: mrcomptech.com
Harddisk Quota: unchanged
Traffic Quota: unchanged
CGI: unchecked
SSI: unchecked
SUEXEC: unchecked
Own Error Documents:checked
Auto-Subdomain: www.
SSL: unchecked
PHP: disabled
Active: checked
NO other settigns were changed

Checked to see if named would restart without error.
And no it doesn't!

Starting named:
Error in named configuration:
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0. 0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
zone 0.in-addr.arpa/IN: loaded serial 0
zone mrcomptech.com/IN: NS 'ns1.mrcomptech.com' has no address records (A or AAAA)
zone mrcomptech.com/IN: NS 'ns2.mrcomptech.com' has no address records (A or AAAA)
zone mrcomptech.com/IN: not loaded due to errors.
_default/mrcomptech.com/IN: bad zone
[FAILED]

MrCompTech
10th July 2010, 21:07
I also noticed that when I ping or nslookup (to ISPConfig3 server) I get my publlic IP address instead of the internal LAn address of my server.

MrCompTech
10th July 2010, 22:24
On my LAN my 'main' domain is mrcomptech.com
I had already added a DNS zone for this.

The FQDN of my server is prl-ofc-s01.mrcomptech.com.

I added a DNS 'record' for this server as follows:

Log into ISPConfig3 web admin.
DNS tab --> selected zone "mrcomptech.com"
Clicked on the "Records" tab
Since I used the DNS wizard earlier I already had several records listed here.
I added a new "A" record for prl-ofc-s01.

Tried to restart named and still got the last error I mentioned.

After researching and figuring out how to use the named-checkzone command and without making any changes I tried to restart named again and this time it started!

I confirmed that DNS works on the ISPConfig3 server and on my (win Vista) laptop using the command:
nslookup mrcomptech.com 192.168.1.10
nslookup www.mrcomptech.com 192.168.1.10
nslookup prl-ofc-s01mrcomptech.com 192.168.1.10
The 192.168.1.10 is the IP address of the DNS server that you want to use for the DNS query.

So now I finally see what is happening:

First - changes made in the ISPConfig3 web admin console ARE NOT IMMEDIATE and can take at least several minutes for 'things' to update.

Second - When there is a problem that prevents BIND (named) from starting I do not think that there is any mechanism in place to periodically attempt to restart the BIND deamon. So you must either manually try to restart named or reboot the server.
/etc/init.d/named startThirdly - In ISPConfig3 web admin when you configure your ISPConfig3 server:

System tab --> Server Config --> (select your server) -->

The host name listed must have a DNS entry.

So if, as in my case, my internal domain is "mrcomptech.com" and the name of my ISPConfig3 server is "prl-ofc-s01" then the FQDN of my ISPConfig3 server is "prl-ofc-s01.mrcomptech.com".

In order for DNS to work properly there must be a DNS entry for this server in the mrcomptech.com DNS records!

Part of this is that when you add a DNS Zone, DNS tab --> "Add New DNS Zone". One of the items you enter is the hostname of the DNS server and NOT the IP address of the DNS server. So, if using hostnames then there MUST be a way to resolve the host name that is used, including the hostname of the DNS server!

So even though I added the domain for "mrcomptech.com" I had not yet added an "A" record for the server "prl-ofc-s01" so 'things' didn't work properly.

This came to light after a ran the commands:
cd /var/named
named-checkzone mrcomptech.com pri.mrcomptech.com
/var/named - location of the zone files
mrcomptech.com - name of the domain to check
pri.mrcomptech.com - name of the file containing the zone records

When I ran this command when DNS was not working, part of the error message indicated that that was no record for "prl-ofc-s01.mrcomptech.com".

I knew there was an entry for this server in the /etc/hosts file so this didn't make sense. But apparently named is NOT reading the hosts file for name resolution.

rudisoft
31st July 2010, 10:13
Hello everyone,

Using the same setup (The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]) on 2 different servers (local and production),
i had exaclty the same problem.

On local server I followed the tutorial for installing, while on production server had a minimal setup with no services.

After many struggles and almost giving up, i managed to solve the problem, and now DNS works great!

Thanx to @MrCompTech for all his helpful posts (esp. the last one), they were a great starting point in solving my problem!

Here are the steps i took in order to make it work:

1. Before step 17 in the tutorial (17 Install BIND) make sure bind-chroot is not installed.
You can check with:

yum list installed bind*

and remove it with

yum remove bind-chroot

2. I did this after finishing the tutorial, and installing ISPConfig (ISPConfig configures bind)
The file "named.conf.local" is first created when you start to add DNS Zones in ISPConfig,
so until then starting bind fails with the error that it can't find this file.
So we create the file and give the same permissions as "/etc/named.conf"
touch /etc/named.conf.local
chown root:named /etc/named.conf.local
chmod 640 /etc/named.conf.local
Now bind starts ok, and it seems to work, because we have no zones set up

3. Next problem was the "bad zone" / "has no NS records error" when creating DNS zones in ISPConfig.
This gave me the most headache of them all, and took the longest to solve, but it turned out the solution is actually really simple,
and it is given to us in the error message itself:
"zone YOURDOMAINNAMEHERE/IN: has no NS records"
It can't say more clear than that :-)
So, in the DNS zone records in ISPconfig i just had to add NS records like so:
Zone: [LEAVE BLANK]
Nameserver Hostname: ns1.ZONENAME
TTL: 86400
Active: [checked]

And another one for ns2, though i'm not sure it was really necessary.

Then, just make sure you have A records for [BALNK], www, ns1, ns2.

That's it, problem solved!

Note: It is true that changes made by ISPConfig take some time, so please be patiend, wait for a few minutes until veryfing.
In order to verfy if your zone files are ok you can use the following command:
named-checkzone ZONE_NAME /var/named/ZONE_FILE

At this point, DNS only worked locally, external queries were rejected.

4. So i modified the file "./etc/named.conf" like so:
listen-on port 53 { 127.0.0.1;};
became
listen-on port 53 { 127.0.0.1; SERVER_IP;};

and

allow-query {localhost; }
became
allow-query {any; }

I tried @MrCompTech's method with SERVER_IP/24 but it dind't work until i changed to all.

In order to verify is everything is ok, you can use these commands:

host DOMAIN_NAME
nslookup DOMAIN_NAME
dig DOMAIN_NAME @localhost (to check if it works locally)
dig DOMAIN_NAME (to check if it works externally)

This is it. Hope this helps someone!

foxnet
3rd August 2010, 21:27
I solve this problem with a little different way....

Base on Fedora Core 13, bind running in chroot mode.

First I try:
#ln -s /etc/named.conf.local /var/named/chroot/etc/named.conf.local

But not solve, the error message now is that file named.conf.local is not valid.

Than I try:
#ln -P /etc/named.conf.local /var/named/chroot/etc/named.conf.local

THATīS IT!!! Now working!!!
Donīt forget to create domain zone file.

[]s
Fabricio Figueiredo Leao <fox@foxnet.com.br>
Technologist in computer network

Zarteg
6th March 2011, 01:16
Hello everyone,

Using the same setup (The Perfect Server - Fedora 13 x86_64 [ISPConfig 3]) on 2 different servers (local and production),
i had exaclty the same problem.

On local server I followed the tutorial for installing, while on production server had a minimal setup with no services.

After many struggles and almost giving up, i managed to solve the problem, and now DNS works great!

Thanx to @MrCompTech for all his helpful posts (esp. the last one), they were a great starting point in solving my problem!

Here are the steps i took in order to make it work:

1. Before step 17 in the tutorial (17 Install BIND) make sure bind-chroot is not installed.
You can check with:

yum list installed bind*

and remove it with

yum remove bind-chroot

2. I did this after finishing the tutorial, and installing ISPConfig (ISPConfig configures bind)
The file "named.conf.local" is first created when you start to add DNS Zones in ISPConfig,
so until then starting bind fails with the error that it can't find this file.
So we create the file and give the same permissions as "/etc/named.conf"
touch /etc/named.conf.local
chown root:named /etc/named.conf.local
chmod 640 /etc/named.conf.local
Now bind starts ok, and it seems to work, because we have no zones set up

3. Next problem was the "bad zone" / "has no NS records error" when creating DNS zones in ISPConfig.
This gave me the most headache of them all, and took the longest to solve, but it turned out the solution is actually really simple,
and it is given to us in the error message itself:
"zone YOURDOMAINNAMEHERE/IN: has no NS records"
It can't say more clear than that :-)
So, in the DNS zone records in ISPconfig i just had to add NS records like so:
Zone: [LEAVE BLANK]
Nameserver Hostname: ns1.ZONENAME
TTL: 86400
Active: [checked]

And another one for ns2, though i'm not sure it was really necessary.

Then, just make sure you have A records for [BALNK], www, ns1, ns2.

That's it, problem solved!

Note: It is true that changes made by ISPConfig take some time, so please be patiend, wait for a few minutes until veryfing.
In order to verfy if your zone files are ok you can use the following command:
named-checkzone ZONE_NAME /var/named/ZONE_FILE

At this point, DNS only worked locally, external queries were rejected.

4. So i modified the file "./etc/named.conf" like so:
listen-on port 53 { 127.0.0.1;};
became
listen-on port 53 { 127.0.0.1; SERVER_IP;};

and

allow-query {localhost; }
became
allow-query {any; }

I tried @MrCompTech's method with SERVER_IP/24 but it dind't work until i changed to all.

In order to verify is everything is ok, you can use these commands:

host DOMAIN_NAME
nslookup DOMAIN_NAME
dig DOMAIN_NAME @localhost (to check if it works locally)
dig DOMAIN_NAME (to check if it works externally)

This is it. Hope this helps someone!


THANKS IT WORKED GREAT!

Not sure why it took me so long to Goog the answer !