I would like to set up a master and a slave BIND nameserver, where the master is hidden and currently on a dynamic IP. I set up a dynamic DNS service on a separate domain for it.
So far the documentation I've read only shows IP addresses and no host names in the masters
field of the zone
section.
Is it possible to use host names there too?
This is not possible, as the syntax requires IP addresses.
Some things to consider:
How useful it is to have a nameserver with a dynamic IP? That's exactly why there isn't even possibility to use hostnames. Since you can't use this as a listed NS anyway, it's not very useful; you could simply replace it's role as a master with one of the public nameservers.
If you really need, for some reason, this kind of extra protection for the master nameserver, why does it even have a public IP? You could use a VPN connection between the servers, where the master can have a static private IP. VPN solutions can use hostnames instead of IP addresses.