Fix README
authorNico Kaiser <nico.kaiser@boerse-go.de>
Wed, 2 Oct 2013 13:33:10 +0000 (15:33 +0200)
committerNico Kaiser <nico.kaiser@boerse-go.de>
Wed, 2 Oct 2013 13:33:10 +0000 (15:33 +0200)
README.md

index 84e01f1..892da5a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,18 +1,21 @@
-Dyndns: a simple DynDNS server in PHP
-=====================================
+# Dyndns: a simple DynDNS server in PHP
 
 This script takes the same parameters as the original dyndns.org server does. It can update a BIND DNS server via `nsupdate`.
 
 As it uses the same syntax as the original DynDNS.org servers do, a dynamic DNS server equipped with this script can be used with DynDNS compatible clients without having to modify anything on the client side.
 
 
-Installation
-------------
+### Features
 
-This script acts like the original DynDNS.org server and handles DNS updates on the url
+This script handles DNS updates on the url
 
     http://yourdomain.tld/?hostname=<domain>&myip=<ipaddr>
 
+For security HTTP basic auth is used. You can create multiple users and assign host names for each user.
+
+
+### Installation
+
 To be able to dynamically update the BIND DNS server, a DNS key must be generated with the command:
 
     ddns-confgen
@@ -37,21 +40,20 @@ and saved to a file which is referenced in config.php as "bind.keyfile". In the
 
 In this case, the zone is also called "dyndns.example.com". The (initial) db.dyndns.example.com file (located in BIND's cache directory) looks like this:
 
-$TTL 1h
-@ IN SOA dyndns.example.com. root.example.com. (
-        2007111501      ; serial
-        1h              ; refresh
-        15m             ; retry
-        7d              ; expiration
-        1h              ; minimum
-        )  
-        NS <your dns server>
+  $TTL 1h
+  @ IN SOA dyndns.example.com. root.example.com. (
+          2007111501      ; serial
+          1h              ; refresh
+          15m             ; retry
+          7d              ; expiration
+          1h              ; minimum
+          )  
+          NS <your dns server>
 
 Remember to change access rights so BIND is able to write to this file.
 
 
-PHP script configuration
-------------------------
+### PHP script configuration
 
 The PHP script is called by the DynDNS client, it validates the input and calls "nsupdate" to 
 finally update the DNS with the new data. Its configuration is rather simple, the user database is
@@ -59,7 +61,7 @@ implemented as text file "dyndns.user" with each line containing
 
     <user>:<password>
 
-Where <password> is crypt'ed like in Apache's htpasswd files. 
+Where the password is crypt'ed like in Apache's htpasswd files. 
 Hosts are assigned to users in using the file  "dyndns.hosts":
 
     <host>:<user>(,<user>,<user>,...)
@@ -71,72 +73,40 @@ The location of these files must be specified in  "config.php". For security rea
 them in your Document root, otherwise every Web user can read them.
 
 
-
-Implementation
---------------
-
-Here you can find details on which capabilities of the DynDNS specification are implemented.
-
-Hostname: members.dyndns.org
-HTTP ports: 80, 8245
-HTTPS port: 443 (not supported!)
-
-
-Usage
------
+### Usage
 
 Authentication in URL:
 
-http://username:password@yourdomain.tld/?hostname=yourhostname&myip=ipaddress
+  http://username:password@yourdomain.tld/?hostname=yourhostname&myip=ipaddress
 
 
 Raw HTTP GET Request:
 
-GET /?hostname=yourhostname&myip=ipaddress HTTP/1.0 
-Host: yourdomain.tld 
-Authorization: Basic base-64-authorization 
-User-Agent: Company - Device - Version Number
+  GET /?hostname=yourhostname&myip=ipaddress HTTP/1.0 
+  Host: yourdomain.tld 
+  Authorization: Basic base-64-authorization 
+  User-Agent: Company - Device - Version Number
 
 Fragment base-64-authorization should be represented by Base 64 encoded username:password string.
 
 
-Implemented fields
-------------------
-
-hostname
-  Comma separated list of hostnames that you wish to update (up to 20 hostnames per request). 
-  This is a required field.
-  Example: hostname=dynhost1.yourdomain.tld,dynhost2.yourdomain.tld
-
-myip
-  IP address to set for the update.
-  (If this parameter is not specified, the best IP address the server can determine will be used)
-
-
-Return Codes
-------------
-
-good
-  The update was successful, and the hostname is now updated.
+### Implemented fields
 
-badauth
-  The username and password pair do not match a real user.
+- `hostname` Comma separated list of hostnames that you wish to update (up to 20 hostnames per request). This is a required field. Example: `hostname=dynhost1.yourdomain.tld,dynhost2.yourdomain.tld`
+- `myip` IP address to set for the update. Defaults to the best IP address the server can determine.
 
-notfqdn
-  The hostname specified is not a fully-qualified domain name (not in the form hostname.dyndns.org 
-  or domain.com).
 
-nohost
-  The hostname specified does not exist in this user account (or is not in the service specified in 
-  the system parameter)
+### Return Codes
 
-badagent
-  The user agent was not sent or HTTP method is not permitted (we recommend use of GET request method).
+- `good` The update was successful, and the hostname is now updated.
+- `badauth` The username and password pair do not match a real user.
+- `notfqdn` The hostname specified is not a fully-qualified domain name (not in the form hostname.dyndns.org or domain.com).
+- `nohost` The hostname specified does not exist in this user account (or is not in the service specified in the system parameter)
+- `badagent` The user agent was not sent or HTTP method is not permitted (we recommend use of GET request method).
+- `dnserr` DNS error encountered
+- `911` There is a problem or scheduled maintenance on our side.
 
-dnserr
-  DNS error encountered
 
-911
-  There is a problem or scheduled maintenance on our side.
+### License
 
-(See http://www.dyndns.com/developers/specs/return.html for more details)
+MIT