Slow website response if BIND is enabled

Hello,
If I disable BIND my website loads in about 1 second, but with BIND enabled it takes about 10-15 seconds to load (the browser just says “Waiting for www.example.com…” for 10-15 seconds).
I do not know what information to give you so you can help me, please ask.

hostname -f returns box.local.web
Can that be a problem because local.web is not a real domain?

Contents of /etc/resolv.conf:

nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4
domain local.web

Contents of /etc/bind/named.conf.default-zones:

zone “realdomain.com” {
type master;
file “/var/lib/bind/realdomain.com.hosts”;
allow-transfer {
127.0.0.1;
localnets;
};
};

realdomain.com uses the NS from a separate DNS that poits to my IP address.
Operating System: Debian 6+Virtualmin GPL

Thank You!

Some questions:

From where and how do you test website fetching (seeing that it’s slow with BIND enabled)?

How is your name service set up in general? As in, how can it work at all when you disable BIND? What nameserver is serving your zones when you disable your BIND?

It would help if you provided the actual domain names and IP addresses involved. They are no secret (after all you’re offering public web services), and they enable us to do some actual tests.

And without further insight, a hunch: Website loading delays of about 10 seconds are usually an indication that one or more of the nameservers configured as authoritative for a domain is not responding. The browser will run into some timeouts until it reaches a nameserver that replies.

Hello,

I am testing from different locations in my city (places where i have access to a computer), so it is outside the server’s network.
I did not touch the BIND default configuration done by Virtualmin.

What nameserver is serving your zones when you disable your BIND?

I do not know.
Actual domain name: box2.no-ip.info poited to 81.196.166.69.

Sometimes the website loads instantly regardless BIND enabled/disabled :(. But it loads instantly everytime if BIND is disabled.
Now I’ll leave BIND enabled so you can run some tests.

During the installation of Debian I set the hostname to “box” and the domain name to “local.web”. Is it OK to use local.web (or anything else, not an existing domain)? or it must be a real domain name?

Thank you!

This setup looks a little fishy. :slight_smile: “no-ip.info” sounds like a dynamic DNS service? Is the IP you mentioned a static one? It is generally not a good idea to operate a nameserver on a dynamic IP.

Actually you should know what nameserver is serving your zone. :slight_smile: I mean, how did you set all this stuff up? How did you register the domain and where did you have the registrar point it to?

An issue is: No NS entry exists for “box2.no-ip.info”, so there is obviously no delegation of the zone to your IP. I.e. no matter if you turn your BIND on or off, it is not queried for your domain anyway. Website loading delays are not caused by your BIND.

Also, it is suggested to not use some “local” host/domain name for your server, but something that is externally resolvable. I.e. have your ISP assign you an actual host and domain name, or set up one, and give the server that hostname.

I e.g. have an “administrative domain” called tianet.de, for which I operate the nameservers myself, and my main Virtualmin server is named (both in the zone and on the system itself) “orion.tianet.de”.

Is “box2.no-ip.info” the host/domain name of your server, or is it the domain you actually wish to serve from it? Those two are, or rather should be, different.

I have a static IP address. No-ip just gives me a free subdomain name on one of their own domains. The only settings on their site are: choose a name, host type (I set it DNS host (A) ), ip address (I set my IP address here). So I do not set the nameservers for that subdomain.
I am using this free domain name now because I want to find the problem with BIND first. I had to give up for now to my real domain and movet it to a shared hosting until I can be sure that my server is up and running (everything was great with BIND disabled).
“box2.no-ip.info” is the domain I wish to serve. The domain for my server is an invented one “box.local.web”.
Also, it is suggested to not use some “local” host/domain name for your server, but something that is externally resolvable
That is what I did first:
setup Debian box with box.realdomain.com, registered 2 nameservers with my domain registrar (ns1.realdomain.com ns2.realdomain.com) to point to my IP. Then Webmin-Servers-BIND DNS Server-create master zone:
Domain name / Network - realdomain.com; Master Server: ns1.realdomain.com and when I hit CREATE i get: “Failed to create master zone : This zone already exists”
The same procedure worked with no error if I setup the Debian box with invented “box.local.web”, so I concluded that it is not possible to use the same domain name for the server, virtual server and DNS in the same time.
Now that I look at that configuration again I think understand that the master zone was already up and running, so it is possible to run all on the same name.

Let me see if I get all your suggestions right:
-setup the linux box with a real externally resolvable domain name (real.com;Is this a must?) and any hostname I whant (box.real.com)
-register 2 nameservers at the registrar for that domain name, to poit to my IP
-create the nameservers on my server

Please let me know if I get it all right!

I have a static IP address. No-ip just gives me a free subdomain name on one of their own domains.

Okay that’s fine. You probably misinterpreted that “subdomain” you mentioned there as an actual delegation, because they merely configured an A record for you, not an NS. :slight_smile:

That is what I did first: […]

That sounds okay, up to the point where you tried to create a master zone for a domain name that you obviously already entered in Virtualmin. That will fail, indeed. Basically, you can manage your “administrative” domain (the one which contains the server’s hostname) through Virtualmin, but it is recommended to do that directly in Webmin.

Let me see if I get all your suggestions right: […]

Sounds good. :slight_smile: Create the BIND zone directly in Webmin, do not create a Virtualmin vserver for it.

I’ll get right to it!
Thank you for all your great help! I should be fine this time :)…I hope…

You’re welcome! :slight_smile: Let me know if you have further issues.