Guys I am hoping I can find help here.
I am having trouble setting up Authoritative-Only DNS Servers.
One server is a Cloud Virtual Server XL (master server and web server - has Plesk) the other one is Cloud Virtual Server S (slave server).
Please note that servers have different IPS and aren't in the same range but they are something like this: The XL Virtual Server(8X.1XX.1XX.2XX) and the S Virtual Server (9X.9X.2XX.9X).
I am aware that there are more types of DNS, but with some light reading and googling I figured Authoritative-Only are best for my use.
The current problem I am having is that my domains aren't getting through to my nameservers. I'm getting a server not found on all of them, the main domain however is pointed correctly and resolves to the main machine.
The guide I used: https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-an-authoritative-only-dns-server-on-ubuntu-14-04.
I followed it from word to word, only part that I left out is Reverse Zones (in-addr.arpa) I am not sure on how to proceed on those. However, I did set my hostnames and Reverse DNS in their Control panel (1and1 Control Panel) to vps1.xxx.space and vps2.xxx.space (Hopefully my hunch was on point on this one and that should be solved? - again I am probably wrong).
My db.xxx.space file looks like this:
root@vps1:~# sudo nano /etc/bind/zones/db.xxx.xxx
GNU nano 2.5.3 File: /etc/bind/zones/db.xxx.space
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns1.xxx.space. admin.xxx.space. (
5 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
; Name Servers
xxx.space. IN NS ns1.xxx.space.
xxx.space. IN NS ns2.xxx.space.
; A records for name servers
ns1 IN NS 8X.1XX.1XX.2XX
ns2 IN NS 9X.9X.2XX.9X
; other A records
@ IN A 8X.1XX.1XX.2XX
www IN A 8X.1XX.1XX.2XX
vps1.xxx.space. IN A 8X.1XX.1XX.2XX
vps2.xxx.space. IN A 9X.9X.2XX.9X
xxx.space. IN MX 10 mail.xxx.space.
mail.xxx.space. IN A 8X.1XX.1XX.2XX
ns1.xxx.space. IN A 8X.1XX.1XX.2XX
ns2.xxx.space. IN A 9X.9X.2XX.9X
www.xxx.space. IN CNAME xxx.space.
My /etc/bind/named.conf.local file (master):
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "xxx.space" {
type master;
file "/etc/bind/zones/db.xxx.space";
allow-transfer { 9X.9X.2XX.9X; };
};
My /etc/bind/named.conf.options file:
options {
directory "/var/cache/bind";
recursion no;
allow-transfer { none; };
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
// forwarders {
// 0.0.0.0;
// };
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
My /etc/bind/named.conf file:
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
My /etc/bind/named/conf.local (slave) file:
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "xxx.space" {
type slave;
file "slaves/db.xxx.space";
masters { 8X.1XX.1XX.2XX; }; #ns1 private IP
};
My advanced DNS settings for the main domain (xxx.space) that is supposed to have nameservers.Advanced Panel at namecheap.com
Rest of the domains have their custom name servers option set and point to the ns1.xxx.space and ns2.xxx.space nameservers.
I registered the name servers with namecheap.com as well, through the advanced DNS panel!
My Plesk DNS configuration: Plesk Screenshot
If you have any more questions feel free to ask.
Misc information:
- All domains are hosted (except a few - not working as well) at namecheap.com
- Servers are hosted at 1and1.com - Germany
- Everything on the servers is up to date. (BIND etc.)
- Servers are running Ubuntu 16.04
My questions:
- What could be causing these issues for me?
- Could there be an issue because I am using IPs that aren't in the same range?
- How should I address Reverse Zones for two single IPs in the files?
I appreciate any help, suggestions or pointers!