2018-08-06 21:20:14 +02:00
|
|
|
# ownDynDNS
|
2025-03-03 11:29:04 +01:00
|
|
|
Self-hosted dynamic DNS php script to update netcup DNS API from Router like AVM FRITZ!Box or UniFi Gateways
|
2018-08-06 21:13:49 +02:00
|
|
|
|
|
|
|
## Authors
|
2018-08-06 21:25:47 +02:00
|
|
|
* Felix Kretschmer [@fernwerker](https://github.com/fernwerker)
|
|
|
|
* Philipp Tempel [@philipptempel](https://github.com/philipptempel)
|
2019-05-16 18:00:21 +02:00
|
|
|
* Branko Wilhelm [@b2un0](https://github.com/b2un0)
|
2018-08-06 21:13:49 +02:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
### Installation
|
2024-12-07 01:41:40 +01:00
|
|
|
* Copy all files to your [webspace](https://community.netcup.com/en/tutorials/ddns-with-webhosting)
|
2019-05-16 18:00:21 +02:00
|
|
|
* create a copy of `.env.dist` as `.env` and configure:
|
|
|
|
* `username` -> The username for your Router to authenticate (so not everyone can update your DNS)
|
|
|
|
* `password` -> password for your Router
|
|
|
|
* `apiKey` -> API key which is generated in netcup CCP
|
|
|
|
* `apiPassword` -> API password which is generated in netcup CCP
|
|
|
|
* `customerId` -> your netcup Customer ID
|
|
|
|
* `debug` -> true|false enables debug mode and generates output of update.php (normal operation has no output)
|
2018-08-06 21:13:49 +02:00
|
|
|
|
2022-02-14 14:24:35 +01:00
|
|
|
* Create each host record in your netcup CCP (DNS settings) before using the script. The script does not create any missing records.
|
2018-08-06 21:13:49 +02:00
|
|
|
|
2019-05-16 18:00:21 +02:00
|
|
|
### AVM FRITZ!Box Settings
|
|
|
|
* Go to "Internet" -> "Freigaben" -> "DynDNS"
|
|
|
|
* Choose "Benutzerdefiniert"
|
2023-05-12 21:23:34 +02:00
|
|
|
* Update-URL: `https://<url of your webspace>/update.php?user=<username>&password=<pass>&ipv4=<ipaddr>&ipv6=<ip6addr>&domain=<domain>`
|
|
|
|
* only the url needs to be adjusted, the rest is automatically filled by your AVM FRITZ!Box
|
|
|
|
* http or https is possible if valid SSL certificate (e.g. Let's Encrypt)
|
2023-05-12 21:10:01 +02:00
|
|
|
* Single Domain:
|
2023-05-12 21:23:34 +02:00
|
|
|
* Domainname: `<host record that is supposed to be updated>`
|
|
|
|
* Multiple Domains:
|
|
|
|
* Domainname: `<first host record that is supposed to be updated>,<second host record that is supposed to be updated>,....`
|
2019-05-16 23:22:13 +02:00
|
|
|
* Username: `<username as defined in .env file>`
|
|
|
|
* Password: `<password as definied in .env file>`
|
2018-08-06 21:13:49 +02:00
|
|
|
|
2025-03-03 11:29:04 +01:00
|
|
|
### UniFi Gateways
|
|
|
|
* Go to "Settings" -> "Internet" -> "Choose WAN Interface" -> "Dynamic DNS" -> "+ Create New Dynamic DNS"
|
|
|
|
* Service "Choose -> `dyndns`"
|
|
|
|
* Hostname: `<host record that is supposed to be updated>`
|
|
|
|
* Username: `<username as defined in .env file>`
|
|
|
|
* Password: `<password as definied in .env file>`
|
|
|
|
* Server: `dyn.yourdomain.com/update.php/\/nic/update?user=%u&password=%p&ipv4=%i&force=0&mode=both&domain=%h`
|
|
|
|
|
2019-05-16 18:00:21 +02:00
|
|
|
# run as cronjob on a **nix based device
|
|
|
|
* see [examples](./examples)
|
|
|
|
|
2018-08-06 21:13:49 +02:00
|
|
|
## References
|
|
|
|
* DNS API Documentation: https://ccp.netcup.net/run/webservice/servers/endpoint.php
|
2018-08-06 21:15:16 +02:00
|
|
|
* Source of dnsapi.php: https://ccp.netcup.net/run/webservice/servers/endpoint.php?PHPSOAPCLIENT
|
2018-08-06 21:13:49 +02:00
|
|
|
|
|
|
|
## License
|
|
|
|
Published under GNU General Public License v3.0
|
2021-03-16 10:44:41 +01:00
|
|
|
© Felix Kretschmer, 2021
|