Skip to content

flohoff/dyndnsapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Adding a host

Create a uuid and a json config file like this

uuidgen
67f9a2ff-9f3f-43cc-9429-299486c781d0
echo '{ "zone": "dynamic.uucico.de", "hostname": "sid" }' >hosts/67f9a2ff-9f3f-43cc-9429-299486c781d0.json

Now the host sid.dynamic.uucico.de may be modified with:

curl -6 https://dynamic.uucico.de/dyndns/v1/update/67f9a2ff-9f3f-43cc-9429-299486c781d0/v6/request/0.0.0.0

Options may be removed e.g.

curl -4 https://dynamic.uucico.de/dyndns/v1/update/67f9a2ff-9f3f-43cc-9429-299486c781d0/v4

Will update the v4 record from the REQUESTS address and remove everything else.

Modes of record manipulation

The url consists of

/v1/update/<uuid>/<mode>/<source>/<address>
  • uuid has to match the file in the the hosts directory

  • mode is

    • v6 Deletes all records and adds a v6 record
    • v6only Updates only the v6 record and ignores others
    • v4 Deletes all records and adds a v4 record
    • v4only Deletes only the v4 record and ignores others
  • source is

    • request Take address from the Webservers REMOTE_ADDRESS
  • address could be a manual address to be set

FritzBox usage

The Fritz!Box supports commercial DynDNS offerings but it works with this setup aswell. Use a string like this. The Fritz!Box will replace the and with the correct ip addresses.

https://dynamic.uucico.de/dyndns/v1/updateall/youruuid/<ipaddr>/<ip6addr>/

The Fritz!Box Web GUI has fields for Domainname, Username and Password which may not be empty. So put anything in there. The code will ignore it.

Installation

dyndns config

You need to create a config with all zones which are updateable with server server and key:

{
	"zones": {
		"dynamic.uucico.de": {
			"server": "localhost",
			"key": "hmac-md5:uucicoupdate:Jkhjdiuh787sJKsha=="
		}
	}
}

Apache config

ScriptAlias /dyndns/ /var/www/dyndns/dyndns/
<Location /dyndns/>
    Options ExecCGI
    SetHandler fcgid-script
</Location>	

Bind config

You will need to add a dynamic updateable zone with a key. This key needs to be in the config.js aswell.

zone "dynamic.uucico.de." {
    type master;
    file "dynamic/dynamic.uucico.de";
    
    allow-update { key uucicoupdate; };
    allow-query { any; };
};

About

v4/v6 mixed address family dyndns api server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages