Ddnames - Dynamic Domain Name System for IoT
ddnames.com is an API-first Dynamic Domain Name System (DDNS) architecture engineered to keep DNS records continuously synchronized with dynamic IP addresses assigned to IoT devices, edge nodes, and self-hosted server environments.
Engineering Background and Motivation
I developed ddnames backend to solve a fundamental problem in edge computing: residential ISP dynamic IP allocation breaking inbound traffic routing to IoT hardware and personal infrastructure.
Big-tech proprietary DDNS services often require bloated desktop applications, intrusive telemetry, or restrictive commercial paywalls. In collaboration with cofounder Evgeniy Teneta (who originated the concept of an open dynamic DNS tailored for IoT hardware), I engineered ddnames backend as a lean, API-driven solution centered around standard JSON HTTP endpoints and backend PowerDNS integration.
System Architecture and Data Flow
The core architecture operates as an intermediary service between localized client daemons and authoritative nameservers.
+------------------+ (DHCP) +-------------------+
| IoT Edge Device | -------------> | Residential Router|
+------------------+ +-------------------+
| |
(Cron/Python Agent) (Dynamic Public IP)
| |
+-----------------+------------------+
|
v
+-------------------------------+
| ddnames REST API Gateway |
| (JWT Auth & Rate Limit) |
+-------------------------------+
|
v
+-------------------------------+
| PowerDNS Backend Engine |
| (Authoritative Record Sync) |
+-------------------------------+
|
v
+-------------------------------+
| Internet Users / Clients |
+-------------------------------+
Infrastructure Workflow
- IP Detection: The client daemon running on an IoT device polls a lightweight public IP reflector (such as
http://fra.rastem.com.ua/ip.php). - REST Update Dispatch: If the external IP shifts, the daemon dispatches an authenticated JSON payload to the
/updateendpoint. - PowerDNS Binding: The backend validates the JWT bearer token and API key, then updates the DNS A-records across designated authoritative nameservers (
fra.rastem.com.uaandtor.rastem.com.ua).
REST API Specification and Authentication
The ddnames backend uses JWT Bearer authentication paired with user-specific API keys to govern record modifications and enforce rate limits.
1. User Registration and JWT Auth Flow
To register an account, a client posts JSON credentials to the registration route:
curl -X POST http://136.244.82.142:8000/register \
-H "Content-Type: application/json" \
-d '{"email": "engineer@example.com", "password": "secure_password"}'
Upon successful registration, the API issues a persistent apikey. Subsequent logins return a short-lived JSON Web Token (JWT):
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer"
}
2. Domain Binding and Dynamic IP Synchronization
Once nameservers (fra.rastem.com.ua, tor.rastem.com.ua) are configured at the domain registrar, the user binds a domain via /add:
POST http://136.244.82.142:8000/add
Authorization: Bearer <access_token>
{
"email": "engineer@example.com",
"apikey": "your_api_key",
"domain": "device.example.com",
"ipaddress": "198.51.100.42"
}
Periodic updates are pushed via /update:
POST http://136.244.82.142:8000/update
Authorization: Bearer <access_token>
{
"email": "engineer@example.com",
"apikey": "your_api_key",
"domain": "device.example.com",
"ipaddress": "198.51.100.88"
}
3. Account Inspection and Health Monitoring
Users can audit account request quotas, active domain maps, and last-updated timestamps by querying /check:
GET http://136.244.82.142:8000/check
Authorization: Bearer <access_token>
{
"status": "200 OK. Domains Checked",
"email": "engineer@example.com",
"apikey": "Yr15oqCRaDN",
"account_type": "Trial",
"domains_added": 1,
"domains_names_limit": 3,
"requests_made": 8,
"requests_left": 2092,
"requests_limit": 2100,
"domains_remain": [
{
"domain": "device.example.com",
"ipaddress": "198.51.100.88",
"requests_made": 1,
"updated_at": "2025-01-19"
}
]
}
Client-Side Daemon Implementation
I designed lightweight Python client scripts that can run as cron jobs or systemd services on Linux devices (e.g., Raspberry Pi, OpenWrt routers).
import requests
from requests import get
def sync_dynamic_ip():
# 1. Fetch current public IPv4 address
current_ip = get('http://fra.rastem.com.ua/ip.php').text.strip()
# 2. Configuration parameters
token = "your_bearer_token"
email = "engineer@example.com"
apikey = "your_api_key"
domain = "device.example.com"
payload = {
"email": email,
"apikey": apikey,
"domain": domain,
"ipaddress": current_ip
}
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
# 3. Push update payload to ddnames API
response = requests.post(
'http://136.244.82.142:8000/update',
json=payload,
headers=headers
)
print(f"Status: {response.status_code}, Response: {response.text}")
if __name__ == "__main__":
sync_dynamic_ip()
Team and References
ddnames was conceived and built by a dedicated team:
- Serhii Hrekov (Founder & Sole Developer): Built the core application backend, API infrastructure, Nextra documentation web portal, and client libraries.
- Evgeniy Teneta (Cofounder & Idea Originator): Originated the idea of creating a lightweight dynamic DNS service tailored specifically for IoT edge hardware.