Say I have a zone file with entries like this:

gateway A

Is there some way I can specify the network part as a prefix, say 192.168.1 and then only list the host part in the A records?

1 Answer 1


Not with a standard bind.

Related, you have the $ORIGIN and $GENERATE macros, but they won't help you doing what you need.

You can either preprocess your zone files if using bare text files, or use another backend (see bind DLZ project).

  • Interesting. Since I'm already using ansible on this project, I might just template the zone files as an ansible template then.
    – pnadeau
    Commented Jan 20, 2021 at 15:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .