/DirectAdmin-DDNS

Script to dynamically update DNS records of DirectAdmin

Primary LanguagePHP

Dynamic DNS for Directadmin

Want to attach your home server to a subdomain but don't know how? Use this simple PHP script with a cronjob to dynamically update your DNS records!

Setup

ssh to your home server and make sure deps are installed, such as php php-curl.

# git clone https://github.com/shoaloak/DirectAdmin-DDNS /opt/dyndns
# vi /opt/dyndns/credentials.json
# cat /opt/dyndns/credentials.json
{
	"username": "myusername",
	"password": "mypassword",
	"hostname": "webXXXX.zxcs.nl",
	"domain": "mydomain.com",
	"subdomain": "mysubdomain"
}
# whereis php # <php location>, usually /usr/bin/php
# crontab -e
* * * * * <php location> /opt/dyndns/dyndns.php

Sources