DNS-API netcup-hosted dynamic DNS php script for FRITZ!Box and Synology DSM
- Felix Kretschmer @fernwerker
- Philipp Tempel @philipptempel
- Branko Wilhelm @b2un0
-
Copy all files to your webspace
-
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 RouterapiKey
-> API key which is generated in netcup CCPapiPassword
-> API password which is generated in netcup CCPcustomerId
-> your netcup Customer IDdebug
-> true|false enables debug mode and generates output of update.php (normal operation has no output)
-
Create each host record in your netcup CCP (DNS settings) before using the script. The script does not create any missing records.
- Go to "Internet" -> "Freigaben" -> "DynDNS"
- Choose "Benutzerdefiniert"
- 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)
- Single Domain:
- Domainname:
<host record that is supposed to be updated>
- Domainname:
- Multiple Domains:
- Domainname:
<first host record that is supposed to be updated>,<second host record that is supposed to be updated>,....
- Domainname:
- Username:
<username as defined in .env file>
- Password:
<password as definied in .env file>
- Go to "Systemsteuerung" -> "Externer Zugriff" -> "DDNS" -> "Anpassen"
- Choose Name for "Serviceanbieter" for example "Netcup"
- Update-URL:
https://<url of your webspace>/update.php?user=__USERNAME__&password=__PASSWORD__&ipv4=__MYIP__&domain=__HOSTNAME__
- only the url needs to be adjusted, the rest is automatically filled by your Diskstation DSM
- http or https is possible if valid SSL certificate (e.g. Let's Encrypt)
- Single Domain:
- Hostname:
<host record that is supposed to be updated>
- Hostname:
- Multiple Domains:
- As DSM can only use a "Serviceanbieter" for one Domain (',' is not allowed for Hostname in DNS Input field) you may add separate "Serviceanbieter"s with distinct names for each Domain
- Benutzername/Email:
<username as defined in .env file>
- Passwort/Schlüssel:
<password as definied in .env file>
- DNS API Documentation: https://ccp.netcup.net/run/webservice/servers/endpoint.php
- Source of dnsapi.php: https://ccp.netcup.net/run/webservice/servers/endpoint.php?PHPSOAPCLIENT
Published under GNU General Public License v3.0
© Felix Kretschmer, 2021