Skip to content

Self-hosted dynamic DNS php script for FRITZ!Box and netcup DNS API

License

Notifications You must be signed in to change notification settings

Zappo-II/ownDynDNS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ownDynDNS

Self-hosted dynamic DNS php script to update netcup DNS API from Routers like AVM FRITZ!Box or via cronjob

This is a Fork that implements some other ways of logging and a slightly different approach to update multiple DNS entries. This approach will most likely work only for subdomains of a given domain but will only use one client connection for doing this.

LogEnhancements & Aliases Fork

  • Ulrich Neu @Zappo-II
    • pass cli params in update.php.
    • more log/debug output.
    • configure logLinesToKeep in .env.
    • aliases for DNS update can be configured in .env - aliases.
    • aliases for DNS update can also be colon appended to domain parameter in URL.
    • URL Payload debug=true may override .env debug settings.

Original Authors

Usage

Prerequisites

  • Log into netcup CCP with your cusomerId
  • Create each host record in your netcup CCP Domain DNS before using the script. The script does not create any missing records.
  • BeAware: Only A (IPv4) and AAAA (IPv6) records will be updatet, depending on availability and validity of either type of IP.
  • Create API Key in your netcup CCP.
  • Create API Password in your netcup CCP.

Installation

  • 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 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) besides errors.
    • log -> true|false enables logging
    • logFile -> FileName for logFile. Example: log.json
    • logLinesToKeep -> Keep this much lines per domain in logFile
    • aliases -> List of alias DNS entries that should also be changed, colon delimited. BeAware, only existing DNS Entries that match the given aliases will be updated

AVM FRITZ!Box Settings

  • 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 in by your AVM FRITZ!Box.
    • http or https is possible if valid SSL certificate (e.g. Let's Encrypt) is used by your webspace.
    • http is definitely NOT recomended.
  • Domainname: <host record that is supposed to be updated>
    • you might append a colon delimited list of aliases...
    • example. www.my-home.de,fritzbox.my-home.de,mail.my-home.de
    • BeAware, only existing DNS Entries that match the given Domainname OR any of the given aliases will be updated
  • Username: <username as defined in .env file>
  • Password: <password as definied in .env file>

run as cronjob on a **nix based device

References

Original License

Published under GNU General Public License v3.0
© Felix Kretschmer, 2019-

About

Self-hosted dynamic DNS php script for FRITZ!Box and netcup DNS API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%