What do I need to do for this not to happen? Also, I want to host a website under abc-domain.com but because it is not letting me create the virtual server, I don’t have a public_html folder.
I am able to receive emails though.
Thanks for your help!
Hmm, did you by chance manually add abc-domain.com (or a related domain name) to your BIND DNS config? If so, that might explain the errors you’re receiving.
//
// 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.
//
include “/etc/named.rfc1912.zones”;
include “/etc/named.root.key”;
zone “abc-domain.com” {
type master;
file “/var/named/abc-domain.com.hosts”;
};
zone “123-domain.com” {
type master;
file “/var/named/123-domain.com.hosts”;
allow-transfer {
127.0.0.1;
localnets;
177.222.99.194;
};
};
zone “other-domain.com” {
type master;
file “/var/named/other-domain.com.hosts”;
allow-transfer {
127.0.0.1;
localnets;
177.222.99.194;
};
};
The IP 177.222.99.194 is not my actual IP. In fact that is the IP of my ns2.abc-domain.com. The main IP I use is another one which I use for ns1.abc-domain,com and as main server IP.
You should not add DNS zones you intend to host through Virtualmin manually following some tutorials. If you need some administrative domain which hold the hostname of your system, you should not add that in Virtualmin.
You’re seeing the 123.com contents for ABC.com now because Apache serves the alphabetically first server for hostnames it doesnt know.
You can also configure all that DNS from within Virtualmin. But if you manually add those ahead of time, that confuses things a bit
Yeah, as you suggested, just delete the DNS zone that was manually added.
Virtualmin will create a zone for that domain when you add it into Virtualmin (assuming you enable the DNS feature for that domain) – and then you can add and remove DNS entries as-needed.
I deleted the zone and created the new virtual server and it is working. But, I have other questions:
1- There are other DNS Zones which are created by default, do I need them or should I delete them? They are the following:
Root Zone - 0 - 0000::1 - 127.0.0.1 - localhost
2- In the DNS Records File for abc-domain.com, I have 2 nameservers showing the same IP, while the ns2.abc-domain.com should be my second IP, as I have it in my domain registrar.
1 - As Eric said, the other zones you see in BIND are created by default and are required. If you remove the root zone, BIND cannot act as a forwarding resolver anymore, because it loses information about the root nameservers. The other three are forward and reverse localhost zones which are not strictly required, but it’s recommended to leave them be.
2 - After you have fixed the incorrect IP, you might want to check if newly created domains always get the wrong nameserver IP. If so, there’s probably something wrong with your server template.
When you say “log into”, do you mean accessing my server through ssh using the ip address assigned to ns2.abc-domain.com ?
I’m unable to ssh using that IP address. I get connection timed out.
I’m unable to get a response when pinging to that IP address or to ns2.abc-domain.com
I wasn’t able to log in my server through ssh using the external ip associated with ns2.abc-domain.com even though I have the ports opened in my router.
So, I logged in using the internal ip address. I ran the command netstat -an | grep :53 and this is the output:
Can you summarize what exactly the current/remaining problem is? I checked “abc-domain.com” and can’t find any immediate problems with it.
Are “abc-domain.com” and “123-domain.com” the actual names, or did you use dummies there? For analysis, it’s important to know the exact domain names and IP addresses involved.
1 - Apparently your second nameserver is not responding to DNS queries. Possibly a firewall is filtering UDP traffic on port 53.
About the SOA serial: Usually you use the scheme YYMMDDnnn as serial number. You can set Webmin to do so in the BIND module config.
2 - Your nameservers report “NXDOMAIN” (unknown hostname) for “apollo.pcelements.com”.
3 - Can you be more specific there? In general, it’s one of your system’s domains that resolves to the right IP as hostname, the proper port (110 for POP3, 143 for IMAP and so on), and what username to use depends on your Virtualmin setup. (See the domain’s user config screen.)
1- This is a server located at my office. Each NIC is connected to its own router. Ports for http, https, dns, ftp, and ssh are opened in both routers.
The iptables output looks like the default that Virtualmin sets up. The DNS port should be open okay there. Possibly some other firewall or router in front of your office server blocks / doesn’t properly forward UDP port 53 to your server.