{"id":21221681,"url":"https://github.com/perryflynn/nsupdate-interactive","last_synced_at":"2025-07-10T13:32:49.588Z","repository":{"id":69922112,"uuid":"298898388","full_name":"perryflynn/nsupdate-interactive","owner":"perryflynn","description":"Edit dns zones with a text editor and RFC2136 nsupdate","archived":false,"fork":false,"pushed_at":"2022-07-01T08:45:57.000Z","size":37,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T01:37:27.310Z","etag":null,"topics":["dns","dns-zone","dyndns","hmac-key","nsupdate","rfc2136"],"latest_commit_sha":null,"homepage":"https://serverless.industries/2020/09/27/dns-nsupdate-howto.en.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perryflynn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-26T20:58:00.000Z","updated_at":"2023-05-01T19:28:39.000Z","dependencies_parsed_at":"2023-03-27T16:02:20.806Z","dependency_job_id":null,"html_url":"https://github.com/perryflynn/nsupdate-interactive","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/perryflynn/nsupdate-interactive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perryflynn%2Fnsupdate-interactive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perryflynn%2Fnsupdate-interactive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perryflynn%2Fnsupdate-interactive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perryflynn%2Fnsupdate-interactive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perryflynn","download_url":"https://codeload.github.com/perryflynn/nsupdate-interactive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perryflynn%2Fnsupdate-interactive/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264585371,"owners_count":23632646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","dns-zone","dyndns","hmac-key","nsupdate","rfc2136"],"created_at":"2024-11-20T22:31:29.498Z","updated_at":"2025-07-10T13:32:49.583Z","avatar_url":"https://github.com/perryflynn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Interactive nsupdate\n\nThis script allows to interactively edit DNS records\nwith [RFC2136](https://tools.ietf.org/html/rfc2136),\na HMAC key and `nsupdate`.\n\n## Requirements\n\n- `dig`\n- `nsupdate`\n- `diff`\n- `colordiff`\n- `named-checkzone`\n- A HMAC key which is allowed to perform `update` and `transfer` to a DNS zone\n\n### Install packages on Ubuntu\n\n```sh\napt install dnsutils diffutils colordiff bind9utils\n```\n\n### `named-checkzone` was not found but package is installed\n\nOn Debian `named-checkzone` is located in `/usr/sbin`. As normal user\nyou need to add the path to your `$PATH` variable or create a synlink\nin `/usr/bin` so that the Shell and the Tool can find the executable.\n\n## Parameters\n\n```txt\nusage: nsupdate-interactive.py [-h] (--zone example.com | --get-zone-slug example.com) [--dnsserver ns1.example.com]\n                               [--ignore-rrtype RRSIG]\n\nnsupdate-interactive\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --zone example.com    The zone name\n  --get-zone-slug example.com\n                        Slugify a zone name for hmac key envs\n  --dnsserver ns1.example.com\n                        DNS server to use\n  --ignore-rrtype RRSIG\n                        Ignore RR types, can be used multiple times\n\nPer default, the following RR types will be ignored:\nDNSKEY, RRSIG, NSEC, TYPE65534, CDS, CDNSKEY\n```\n\n## Multiple HMAC Keys\n\nDefine multiple HMAC keys as environment variables as follows:\n\n```sh\n./src/nsupdate-interactive.py --get-zone-slug hüpf.net\nHMAC_XN__HPF_HOA_NET\n./src/nsupdate-interactive.py --get-zone-slug serverless.industries\nHMAC_SERVERLESS_INDUSTRIES\n```\n\n```sh\nexport HMAC_XN__HPF_HOA_NET=hmac-sha256:my-huepfnet-keyname:THEKEYINBASE64FORMAT\nexport HMAC_SERVERLESS_INDUSTRIES=hmac-sha256:my-serverless-keyname:THEKEYINBASE64FORMAT\n```\n\nThen the script will look automatically for a per-domain HMAC key:\n\n```sh\n./nsupdate-interactive.py --zone nerdbridge.de\n```\n\n## How it work\n\n```sh\nHMAC=hmac-sha256:my-awesome-keyname:THEKEYINBASE64FORMAT\n./nsupdate-interactive.py --zone example.com\n```\n\nThe script will detect the authoritative name server of the specified\nzone by its SOA record and will generate a pretty formatted zone file.\nThe file will be opened in `$EDITOR` (fallback is `nano`) afterwards.\n\nAfter saving the file it will show a diff:\n\n```diff\n--- nsupdate_ns1.example.com_example.com_20200926T222019Z.org\t2020-09-26 22:20:19.369097326 +0200\n+++ nsupdate_ns1.example.com_example.com_20200926T222019Z.new\t2020-09-26 22:20:33.768947883 +0200\n@@ -49,7 +49,7 @@\n ;; Create new records\n ;; Feel free to add/modify records here\n update add                  example.com.   900  IN  TXT   \"v=spf1 +mx -all\"\n-update add                  example.com.   900  IN  TXT   \"Hello Nerds, how are you going?\"\n+update add                  example.com.   900  IN  TXT   \"Hello Nerds, how are you going? :-)\"\n update add                  example.com.  3600  IN  MX    10 example.com.\n update add                  example.com.  3600  IN  AAAA  ::1\n update add                  example.com.  3600  IN  A     127.0.0.1\n```\n\nIf the diff is approved with hitting `ENTER`, the script will use\nthe diff to generate a `nsupdate` batch file and send it to\nthe nameserver.\n\nThe diff and the generated nsupdate batch file are saved as text files\nin the current working directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperryflynn%2Fnsupdate-interactive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperryflynn%2Fnsupdate-interactive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperryflynn%2Fnsupdate-interactive/lists"}