I have included details in the attached images, I tried to create the topic just using text but was unable to post as the forum software thought it recognised links and as a new user I can’t have more than two.
I didnt have any links that I could recognise to take out. Sorry for the inconvenience.
Hi, bind views are a way to have two or more zone files for a domain. In my case I have one for the local network which returns 192.168.1.8 for my server, the other zone file returns an external ip address for the external internet.
If you can view the attached images in my initial comment there is more detail.
I tried, Discourse somehow decided I had posted links in the text and because I am new I could only post two links per post. I don’t have any links to remove so hence resorting to the images.
Discourse well attempt to automatically create links. That’s why is is important to use the </> Preformatted text markup. That will prevent the creation of links as well as keep things legible.
Hi, I use dns views to allow internal and external zone files for my domains.
I host my domains and the zone files on the same server at home.
*my named.conf file has only these entries..*
named.conf
// 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 named.conf.local has*
named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
acl internal-network {
127.0.0.1;
127.0.0.0/8;
192.168.1.0/24;
};
view "external" {
# match all except targets defined on [match-clients] on internal section
match-clients { !internal-network; any; };
# allow all queries
allow-query { any; };
# not allow recursive queries
# recursion no;
zone "marnick.com" {type master; file "/home/marnicka/conf/dns/marnicka.com.db";};
zone "marnicka.com" {type master; file "/home/marnicka/conf/dns/marnicka.com.db";};
zone "pickclickquick.com" {type master; file "/home/marnicka/conf/dns/pickclickquick.com.db";};
zone "jfrserv.com" {type master; file "/home/marnicka/conf/dns/jfrserv.com.db";};
};
view "internal" {
# set internal network zones
match-clients {
localhost;
internal-network;
};
# allow queries
allow-query { localhost; internal-network; };
allow-recursion { localhost; internal-network; };
zone "marnicka.com" {type master; file "/home/marnicka/conf/dns/local/marnicka.com.db";};
zone "marnick.com" {type master; file "/home/marnicka/conf/dns/local/marnicka.com.db";};
zone "pickclickquick.com" {type master; file "/home/marnicka/conf/dns/local/pickclickquick.com.db";};
zone "jfrserv.com" {type master; file "/home/marnicka/conf/dns/local/jfrserv.com.db";};
# include "/etc/bind/named.conf.default-zones";
};
This all works, I have two zone files for each domain, the external one as created by hestia, then a
second local one in a subdir called local in ~/conf/dns/<domain_name>/local
At the moment updates etc to hestia break this by writing entries into /etc/named.conf
error log entry -> log: /etc/bind/named.conf:17: when using 'view' statements, all zones must be in views
Is there a way to have hestia manage views?
Kind regards,
Andrew