LAMP based dynamic DNS over HTTP(s) on premises

For internal infrastructure tasks, we needed a simple, robust and reliable tool for dynamic DNS updates.

We were not aware of any DDNS provider completely meeting our requirements. Neither did various approaches out in the wild. Also we prefer processing sensitive data on premises anyway. In the end, I decided to refactor a set of legacy tools I once had quickly written (and which soon had become a “persistent interim” for some years).

The outcome is a LAMP based PHP class, basically serving as an interface between a web server and an arbitrary DNS (originally BIND9), and optionally logging to and monitoring through an attached database.

In practice, DDDNS enables you for dynamic DNS at the cost of a dedicated web server with a static public IP, yet without any other third party involved. Updates can be triggered by calling simple URLs from an arbitrary LAN through any Internet connection, as long as that connection provides a public IP. The web server then dynamically sets a zone record for the said LAN’s public IP. If a database is attached, and a defined period without updates has passed, the dynamic zone record can be automatically removed to avoid clashes.

More details are likely to follow soon in a short, separate tutorial.

Horizontal Tabs

Task

Time scope: 
2012

Implement a robust, flexible and pluggable tools set for dynamic DNS management on premises.

  • Strictly adhere to official HTTP protocol standards
  • HTTP REST API
  • OOP and API driven maximum re-usability
  • Flexible configuration
  • Variable output (PHP, HTML, JSON) and various system wrappers
  • Optional database logging for reporting and debugging
  • Optional database-driven health checks (monitoring) and alarming
  • Abstraction layers for any involved system/interface (DB/PDO, DNS, HTTP)