Well, it sounds like you have DNS already setup, so it looks as if you have the DNS/nameserver setup process down.
It sounds like you may simply need to configure ns1.main.com/ns2.backup.com as registered domain servers with your domain name registrar, and then setup DNS ‘A’ records for them on your Virtualmin server.
That process is described here in the section named “How do I setup nameservers for my server”:
I just added an A record for ns1.main.com like so: Webmin->Servers->BIND DNS Server->Create Zones from Batch File-> entered main.com:master:main.com.hosts:74.x.x.1
Now in /etc/named.conf
options {
directory “/etc”;
pid-file “/var/run/named/named.pid”;
allow-recursion { localnets; 127.0.0.1; };
allow-transfer {
127.0.0.1;
localnets;
};
};
zone “.” {
type hint;
file “/etc/db.cache”;
};
zone “main.com” {
type master;
file “/var/named/main.com.hosts”;
};
And A records in /var/named/main.com.hosts
$ttl 38400 ns1.main.com. IN A 74.x.x.1 ns2.main.com. IN A 74.x.x.1
So, ns1.main.com (pointing to 74.x.x.1) is already registered with my registrar. By the way, I have main.com using my registrar’s dns hosting (currently only with one A record . to 74.x.x.1).
Can you reiterate please what exactly you have set up now, what exactly you’re trying to achieve and what exactly the problem is?
Important information here would be: Which domain names are involved, which names are supposed to be served by which system, and which of these systems is under your administration? Are you trying to serve the zones from your own system or from a third-party DNS service?
It will also help if you used actual domain names and IP addresses instead of “aliases” like “main.com”. Using those can be confusing and prevent us from doing tests from the outside, and since you’re intending to host web services, hostnames and IP addresses are inherently not a secret anyway.
Both of these domains, “bidswar.com” and “andyofla.com”, do not have their NS entries at the NIC set to your server, but to some other 3rd-party DNS, like you said:
andyofla.com. 3600 IN A 74.80.225.104
;; Received 46 bytes from 74.200.220.212#53(ns1.dns-diy.net) in 134 ms[/code]
What you need to do to serve the zones from your server is: set them up in Virtualmin, and then go to your hoster’s control panel - where you can hopefully configure the NIC entries for your domains - and set the NS entries (i.e. nameserver delegation) to your Virtualmin.
It is configured correctly when the *.gtld-servers.net reply with something like this:
andyofla.com. 172800 IN NS 1st.firelitehost.com.
andyofla.com. 172800 IN NS 2nd.firelitehost.com.
;; Received 139 bytes from 192.43.172.30#53(i.gtld-servers.net) in 23 ms
If you cannot configure the NS entries at your current hoster (which would surprise me), you need to switch to one where you can do that. Nameserver delegation, i.e. configuring NIC data records, is the only way to use your own server as nameserver.
So I have the ability to change the Nameserver delegations through my NIC. Does bidswar.com currently show something like this below?
bidswar.com. 172800 IN NS 1st.firelite.co.
bidswar.com. 172800 IN NS 2nd.firelite.net.
;; Received 139 bytes from 192.43.172.30#53(i.gtld-servers.net) in 23 ms
All my domains are currently set to this use those nameservers except a few, like andyofla.com. But I would like this to work with my DNS server. 1st.firelite.co. and 2nd.firelite.net. are currently registered nameservers through my NIC and point to 74.80.225.104. Will this schema ever work?
Queries for “bidswar.com” reach your server, which then says “REFUSED” though. It seems the zone is not yet set up correctly on your BIND. Make sure the zone is active, loaded, queries are allowed for all sources, and BIND does not report any errors upon loading (check /var/log/syslog).
Best command to verify nameservers is dig, in addition to the website “intodns.com”.
dig 1st.firelight.co +trace shows the full recursive query path
dig bidswar.com @74.80.225.104 directly queries your server for the given name.
The hostnames 1st.firelite.co and 2nd.firelite.net seem to not be set up correctly.
The respective NICs report ns1.dns-diy.net to be responsible nameservers for firelite.co/.net. ns1.dns-diy.net though reports no A records for your two nameserver hostnames, only for “firelite.co” itself. Either you need to configure your server to be responsible for “firelite.co”, or enter the A records at the hoster.
You need to fix that problem first before you can try to set up your server as authoritative server for other domains.
CNAMEs map a hostname to another hostname, not to an IP address. If you want “www” to map to the server’s IP, you need an A record.
BIND notes such errors in the syslog when starting up. Like I suggested before, you should check that for further errors. You can also use Webmin’s BIND module to perform a configuration check which will tell you if there are any errors.