{"id":21221712,"url":"https://github.com/perryflynn/dyndns-cgi","last_synced_at":"2026-02-27T12:33:35.120Z","repository":{"id":69921950,"uuid":"410313375","full_name":"perryflynn/dyndns-cgi","owner":"perryflynn","description":"CGI Wrapper for nsupdate compatible to router DynDNS clients","archived":false,"fork":false,"pushed_at":"2021-09-26T08:49:17.000Z","size":11,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T15:00:04.974Z","etag":null,"topics":["cgi","cgi-bin","dyndns-server","dyndns-service","dyndns-updater","nginx","nsupdate","rfc2136"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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":"2021-09-25T15:48:27.000Z","updated_at":"2023-05-16T19:50:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"210ccb24-3819-428a-9552-73a09bb816af","html_url":"https://github.com/perryflynn/dyndns-cgi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/perryflynn/dyndns-cgi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perryflynn%2Fdyndns-cgi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perryflynn%2Fdyndns-cgi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perryflynn%2Fdyndns-cgi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perryflynn%2Fdyndns-cgi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perryflynn","download_url":"https://codeload.github.com/perryflynn/dyndns-cgi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perryflynn%2Fdyndns-cgi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29894945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T12:09:13.686Z","status":"ssl_error","status_checked_at":"2026-02-27T12:09:13.282Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cgi","cgi-bin","dyndns-server","dyndns-service","dyndns-updater","nginx","nsupdate","rfc2136"],"created_at":"2024-11-20T22:31:56.884Z","updated_at":"2026-02-27T12:33:35.112Z","avatar_url":"https://github.com/perryflynn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dyndns-cgi\n\nA CGI wrapper for [RFC2136 nsupdate](https://serverless.industries/2020/09/27/dns-nsupdate-howto.en.html).\n\nCompatible to AVM Fritz!Box, Ubiquiti EdgeRouter and many more.\n\n## How it works\n\nThe HMAC keys to send updates to nameservers **are encrypted**.\n\nThe keyname and the passphrase are the username and password for the script.\n\n### GET /cgi-bin/dyndns.cgi\n\nThe default endpoint.\n\nUsed by AVM Fritz!Box.\n\n| GET parameter | Description | Example |\n|---------------|-------------|---------|\n| mode | Controls if the IP address should be picked from the query parameters or from the request header | `all`: parameters and request IP are used, `request`: request IP are used, `parameter`: query parameters are used |\n| username | The name of the HMAC key used by nsupdate | `exampleddns` = `/var/www/dyndns-cgi/keys/hmac-exampleddns.enc` |\n| password | Passphrase used to decrypt the HMAC key | |\n| domain | The domain to update | ddns.example.com |\n| ip4 | IPv4 address to use | 127.0.0.1 |\n| ip6 | IPv6 address to use | ::1 |\n| ip | IPv4 or IPv6 address to use, parameter is ignored when `ip4` or `ip6` are defined | 127.0.0.1 |\n\n### GET /nic/dyndns\n\nDynDNS Version 1.\n\nEndpoint requires HTTP Basic Authentication.\n\n| GET parameter | Description | Example |\n|---------------|-------------|---------|\n| host_id | The domain to update | ddns.example.com |\n| myip | IPv4 or IPv6 address to use | 127.0.0.1 |\n\n### GET /nic/update\n\nDynDNS Version 2.\n\nUsed by Ubiqiti EdgeRouter.\n\nEndpoint requires HTTP Basic Authentication.\n\n| GET parameter | Description | Example |\n|---------------|-------------|---------|\n| hostname | The domain to update | ddns.example.com |\n| myip | IPv4 or IPv6 address to use | 127.0.0.1 |\n\n### Examples\n\n```sh\n# original endpoint\ncurl \"https://ns.example.com/cgi-bin/dyndns.cgi?username=exampleddns\u0026password=eeh2phioyaa6ro1eiphuaRiuthee8EiJ\u0026ip4=127.0.0.1\u0026ip6=::1\"\n```\n\n```sh\n# dyndns1\n# picked from ubiquiti edge router\ncurl -u exampleddns:eeh2phioyaa6ro1eiphuaRiuthee8EiJ \"https://ns.example.com/nic/dyndns?action=edit\u0026started=1\u0026hostname=YES\u0026host_id=ddns.example.com\u0026myip=127.0.0.1\"\n```\n\n```sh\n# dyndns2\n# picked from ubiquiti edge router\ncurl -u exampleddns:eeh2phioyaa6ro1eiphuaRiuthee8EiJ \"https://ns.example.com/nic/update?system=dyndns\u0026hostname=ddns.example.com\u0026myip=127.0.0.1\"\n```\n\n## Install\n\nThere is a Ansible example in [ansible-example.yml](ansible-example.yml) as well.\n\n### Packages\n\n```sh\napt install dnsutils nginx-full libnginx-mod-http-lua fcgiwrap\n```\n\n### Files\n\nPlace files on your Debian/Ubuntu system just like they are in the [src/](src/) folder.\n\nIf you run another Linux Distribution you may need to do some changes.\n\n### Configure NGINX\n\nAll required configs can be found in [src/etc/nginx/dyndns_cgi.conf](src/etc/nginx/dyndns_cgi.conf).\n\nIt must be included into a NGINX virtual host.\n\nA example virtual host config can be found in [src/etc/nginx/sites-enabled/example.conf](src/etc/nginx/sites-enabled/example.conf).\n\n### Generate a HMAC key and encrypt it\n\nGenerate a password:\n\n```txt\nperry@localhost ~$ pwgen 32 1\neeh2phioyaa6ro1eiphuaRiuthee8EiJ\n```\n\nCreate a HMAC Key:\n\n```txt\nperry@localhost ~$ dnssec-keygen -a HMAC-SHA512 -b 512 -n HOST exampleddns\nKexampleddns.+165+26667\n\nperry@localhost ~$ cat Kexampleddns.+165+26667.private\nPrivate-key-format: v1.3\nAlgorithm: 165 (HMAC_SHA512)\nKey: 0L0iTAPeXmyWbu0wJMsWw52GqVfeL22aZE2xmhlNcrXNdCgF3262ifx2yIuJs+T1H8CWdV+79HClWOzwvnn/LA==\nBits: AAA=\nCreated: 20210925150939\nPublish: 20210925150939\nActivate: 20210925150939\n```\n\nEncrypt the key with the password:\n\n```txt\nroot@localhost ~# echo -n \"0L0iTAPeXmyWbu0wJMsWw52GqVfeL22aZE2xmhlNcrXNdCgF3262ifx2yIuJs+T1H8CWdV+79HClWOzwvnn/LA==\" | openssl enc -aes-256-cbc -e -iter 1000 -a -salt \u003e /var/www/dyndns-cgi/keys/hmac-exampleddns.enc\nenter aes-256-cbc encryption password: eeh2phioyaa6ro1eiphuaRiuthee8EiJ\nVerifying - enter aes-256-cbc encryption password: eeh2phioyaa6ro1eiphuaRiuthee8EiJ\n```\n\nAdd the key to your BIND9 nameserver:\n\n```txt\nkey exampleddns {\n    algorithm hmac-sha512;\n    secret \"0L0iTAPeXmyWbu0wJMsWw52GqVfeL22aZE2xmhlNcrXNdCgF3262ifx2yIuJs+T1H8CWdV+79HClWOzwvnn/LA==\";\n};\n```\n\nOf course you need now **add update policies to the zone** as well.\n\n## Resources\n\n- https://service.avm.de/help/de/FRITZ-Box-Fon-WLAN-7490/016/hilfe_dyndns\n- https://www.gwbasics.be/blog.nsf/dx/custom-dynamic-dns-on-ubiquity-router-with-domaindiscount24.com.htm\n- https://freemyip.com/help\n- https://help.dyn.com/remote-access-api/perform-update/\n- https://github.com/vyos/ddclient/blob/current/ddclient\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperryflynn%2Fdyndns-cgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperryflynn%2Fdyndns-cgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperryflynn%2Fdyndns-cgi/lists"}