Set the masterfile-format. Slaves default to raw, masters default to text.
masterfile-format ( text | raw ); Mark In message <535f4bb2.6000...@theo-andreou.org>, Theodotos Andreou writes: > Hello to all, > > I have a task to clone a black box IPAM to a bind DNS server. Actually > the black box is using bind in the backend but the manufacturer does not > provide any shell access. Only a crappy GUI. So I do not have access to > the text zone files. Just the GUI. > > In order to clone all the zones from the original DNS to the clone, I > setup a bind in slave config and allowed zone transfers for it. This is > a sample config: > > /etc/bind/named.conf.local: > > ... Output omitted ... > > zone "16.2.10.in-addr.arpa" { > type slave; > file "db.16.2.10.in-addr.arpa"; > masters { 10.1.12.61; }; > }; > > zone "24.3.10.in-addr.arpa" { > type slave; > file "db.24.3.10.in-addr.arpa"; > masters { 10.1.12.61; }; > }; > > ... Output omitted ... > > After bind restart, the zone transfers an all zones are completed > successfully. The resultant files are some sort of binary: > > # file /var/cache/bind/db.24.3.10.in-addr.arpa > /var/cache/bind/db.24.3.10.in-addr.arpa: data > > Now to promote the server to master I changed the configuration to: > > /etc/bind/named.conf.local: > > ... Output omitted ... > > zone "16.2.10.in-addr.arpa" { > type master; > file "db.16.2.10.in-addr.arpa"; > }; > > zone "24.3.10.in-addr.arpa" { > type master; > file "db.24.3.10.in-addr.arpa"; > }; > > ... Output omitted ... > > But when I restart bind I get a lot of errors like this: > > named[19773]: dns_master_load: db.24.3.10.in-addr.arpa:1: syntax error > named[19773]: zone 24.3.10.in-addr.arpa/IN: loading from master file db.24.3 > .10.in-addr.arpa failed: syntax error > named[19773]: zone 24.3.10.in-addr.arpa/IN: not loaded due to errors. > > Apparently the systems expects to see a zone file in text format but > because it's in binary it fails. I also tested it with: > > # named-checkzone 24.3.10.in-addr.arpa /var/cache/bind/db.24.3.10.in-addr.arp > ... Output omitted ... > dns_master_load: /var/cache/bind/db.24.3.10.in-addr.arpa:16: syntax error > dns_master_load: /var/cache/bind/db.24.3.10.in-addr.arpa:16: syntax error > dns_master_load: /var/cache/bind/db.24.3.10.in-addr.arpa:16: syntax error > dns_master_load: /var/cache/bind/db.24.3.10.in-addr.arpa:16: syntax error > dns_master_load: /var/cache/bind/db.24.3.10.in-addr.arpa:16: syntax error > dns_master_load: /var/cache/bind/db.24.3.10.in-addr.arpa:16: syntax error > dns_master_load: /var/cache/bind/db.24.3.10.in-addr.arpa:17: syntax error > /var/cache/bind/db.24.3.10.in-addr.arpa: file does not end with newline > zone 24.3.10.in-addr.arpa/IN: loading from master file /var/cache/bind/db.24.3 > .10.in-addr.arpa failed: syntax error > zone 24.3.10.in-addr.arpa/IN: not loaded due to errors. > > I know I must be doing something fundamentally wrong here but I couldn't > find a guide how to do this properly. Any ideas? > > I am using bind version 9.9.5-3-Ubuntu ( the stock binary that comes > with Ubuntu 14.04 64 bit) and the compiled parameters are: > named[7817]: built with '--prefix=/usr' '--mandir=/usr/share/man' > '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' > '--localstatedir=/var' '--enable-threads' '--enable-largefile' > '--with-libtool' '--enable-shared' '--enable-static' > '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' > '--with-geoip=/usr' '--with-atf=no' '--enable-ipv6' '--enable-rrl' > '--enable-filter-aaaa' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' > > _______________________________________________ > Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe > from this list > > bind-users mailing list > bind-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org _______________________________________________ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users