basic support for /24 ipv4 reverse zones
This commit is contained in:
parent
cf4b99a408
commit
e60a2b1927
1 changed files with 7 additions and 2 deletions
|
@ -79,6 +79,11 @@ def get_domain_by_mntner(mntner):
|
|||
line = line[20:]
|
||||
_domain_name = ".".join(
|
||||
line.split(".")[::-1]) + ".in-addr.arpa"
|
||||
if int(line.split("/")[1]) ==24:
|
||||
_domain_name.replace("/24", "")
|
||||
elif int(line.split("/")[1]) <=24:
|
||||
# TODO: implement creation of multiple zones for every /24 within
|
||||
pass
|
||||
elif line.startswith("nserver"):
|
||||
nserver = line[20:].split(" ")
|
||||
# handle edge case where
|
||||
|
@ -304,7 +309,7 @@ def check_dnssec(domain_name, domain_data):
|
|||
no_ds_rdata = domain_data["ds-rdata"] == []
|
||||
if no_ds_rdata:
|
||||
print(
|
||||
f"INFO: {domain_name} doesn't have ds-rdata configured, not checking it")
|
||||
f"NOTE: {domain_name} doesn't have ds-rdata configured, not checking it")
|
||||
|
||||
for nserver in domain_data["nserver"]:
|
||||
|
||||
|
@ -387,7 +392,7 @@ def main(mntner):
|
|||
|
||||
# check if the domain doesn't have DS data
|
||||
if domains[domain_name]["ds-rdata"] == []:
|
||||
print(f"INFO: {domain_name} doens't have any ds-rdata specified")
|
||||
print(f"NOTE: {domain_name} doesn't have any ds-rdata specified")
|
||||
continue
|
||||
|
||||
for nserver in domains[domain_name]["nserver"]:
|
||||
|
|
Loading…
Add table
Reference in a new issue