McLive / DjangoPowerDNS

GNU Affero General Public License v3.0
26 stars 9 forks source link

DynDns #1

Open Kraeutergarten opened 7 years ago

Kraeutergarten commented 7 years ago

Does it support dyndns?

McLive commented 7 years ago

It currently doesn‘t support dyndns. How should a feature like that look like?

For now you can easily create dynamic DNS records with the REST-API.

Kraeutergarten commented 7 years ago

For most routers you need to add username and password to the url like:

https://domain.de/api/v3/update?hostname={hostname}&myip={IPAddress}&user={user}&password={password}

Does this work with your rest api? Some API only support username and password via header.

McLive commented 7 years ago

You have to use an apiKey like this:

http://127.0.0.1:8000/api/domain/1/record/?apiKey=1234567890

Then PUT a json string: { "id": 11, "content": "192.168.178.2" }

This will set the content of record 11 to 192.168.178.2

Kraeutergarten commented 7 years ago

This won't work on the most routers. A lot of router hardware can't do json.

There need to be a extra API for dyndns.

Like: https://domain.de/dyn/v1/update?hostname={hostname}&myip={IPAddress}&user={user}&password={password}

This API should only be able to update records.

Do you come from Germany? Maybe you know Fritz.box (Router)

McLive commented 7 years ago

Yeah I know them but that's currently not supported.

I'll add an api endpoint for dyndns soon