Skip to content

Instantly share code, notes, and snippets.

@mhahl
Last active July 30, 2020 01:35
Show Gist options
  • Save mhahl/0d601e5c83dde8486759acba9195b265 to your computer and use it in GitHub Desktop.
Save mhahl/0d601e5c83dde8486759acba9195b265 to your computer and use it in GitHub Desktop.
CoreDNS - Rewrite
. {
log
# Reverse DNS Entries
template IN PTR in-addr.arpa {
match ^(?P<d>[0-9]*)[.](?P<c>[0-9]*)[.](?P<b>[0-9]*)[.](?P<a>[0-9]*)[.]in-addr[.]arpa[.]$
answer "{{ .Name }} 60 IN PTR ip-{{ .Group.a }}-{{ .Group.b }}-{{ .Group.c }}-{{ .Group.d }}.rhev.lab.local."
}
# Forward records
auto lab.local {
directory /etc/coredns/zones
}
forward . 9.9.9.9
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment