pdyndns
pdyndns copied to clipboard
PowerDynDNS :: A DynDNS clone (web application and DNS server) backed by PowerDNS.
trafficstars
============================ Power DynDNS
Run your own DynDNS-compatible dynamic IP address service!
Usage (setting up the server):
-
Install PowerDNS and its SQLite3 backend eg: apt-get install pdns-server pdns-backend-sqlite3
-
Setup PowerDNS to use "pdyndns/pdns.db" as its SQLite3 database (sample config files are locaed in "pdyndns/etc/powerdns")
-
Start the server: ruby dyndns-server.rb
OR
Setup apache to run pdyndns (using the "passenger" gem and its apache plugin) (sample config file: "pdyndns/etc/apache.conf")
-
Use it!
Usage (setting up a DynDNS client):
- Install a dyndns client, like ddclient eg: apt-get install ddclient
- Configure it to use your new pdyndns server (sample config file in "pdyndns/etc/ddclient.conf")
Usage (just using CURL and a cron job):
- Test if curl works: curl http://username:[email protected]/nic/update?host=me.awesomedomain.com&ip=auto
- Edit your crontab so that it updates the IP every 5 minutes: Run "crontab -e" then paste in: */5 * * * * curl http://username:[email protected]/nic/update?host=me.awesomedomain.com&ip=auto
HTTP API interface:
/nic/update
Parameters:
hostname or host: which hostname to set (eg: "niagara1.ix")
myip or ip: IP address or CNAME target ("auto" will determine IP automatically)
type: record type (A or CNAME)
cname: shorthand for type=CNAME, myip=<what you set cname to> (eg: "niagara1.ix")
ttl: time to live in seconds (default: 90)
Examples:
Automatically detect the client's IP address and update domain.fake's IP:
/nic/update?host=domain.fake&ip=auto
Update domain.fake's IP to 192.168.1.1:
/nic/update?hostname=domain.fake&myip=192.168.1.1
Create a CNAME from src.com to dest.com:
/nic/update?hostname=src.com&cname=dest.com
Create a CNAME from src.com to dest.com, with a TTL of 10:
/nic/update?host=src.com&ip=dest.com&type=CNAME&ttl=10
Requires the following ruby gems:
- sinatra
- haml
- mongrel
- activerecord
- activesupport
- sqlite3-ruby
(Note: Install with "gem install