Created
July 12, 2024 13:26
-
-
Save moondev/d482d3ed1cb6c5a5fb6ebaeadbeaeaea to your computer and use it in GitHub Desktop.
corefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. { | |
forward . 8.8.8.8 | |
# ip-a-b-c-d.example A a.b.c.d | |
template IN A lb.run { | |
match (.*)-(?P<a>[0-9]*)-(?P<b>[0-9]*)-(?P<c>[0-9]*)-(?P<d>[0-9]*)[.]ip[.]lb[.]run[.]$ | |
answer "{{ .Name }} 60 IN A {{ .Group.a }}.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" | |
fallthrough | |
} | |
# d.c.b.a.in-addr.arpa PTR ip-a-b-c-d.example | |
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 {{ .Group.a }}-{{ .Group.b }}-{{ .Group.c }}-{{ .Group.d }}.ip.lb.run." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment