README: fix header line length
[dyn-nsupdate.git] / README.rst
index 5612bbb19da7aca0dc43571a36965aef92e654ae..90bf60ec92d7968615b2b06eba13041ff90a0306 100644 (file)
@@ -1,14 +1,15 @@
-dyn-nsupdate: Dynamically and securely update DNS zones via CGI
-===============================================================
+dyn-nsupdate: Self-made DynDNS
+==============================
 
 Introduction
 ------------
 
 Welcome to dyn-nsupdate_, a collection of tools using BIND_, CGI_ and Python_ to 
-provide DynDNS services. Both IPv4 and IPv6 are fully supported.
+provide DynDNS services with your own nameserver. Both IPv4 and IPv6 are fully
+supported.
 
 dyn-nsupdate consists of two pieces: The server part provides a way to update IP 
-addresses in Bind's DNS zone via CGI, in a safe manner. The client part uses CGI 
+addresses in Bind's DNS zones via CGI, in a safe manner. The client part uses CGI
 to update some domain to the current address(es) of the machine it is running 
 on. Alternatively, some routers can be configured to do this themselves. The 
 FritzBox is known to be supported.
@@ -38,18 +39,19 @@ source directory, run::
   cd nsupd-wrapper
   mkdir -p build
   cd build
-  cmake .. -DCMAKE_BUILD_TYPE=Release -DDYNNSUPDATE_CONFIG_FILE=/var/lib/bind/dyn-nsupdate.conf
+  DIR=/var/lib/bind
+  cmake .. -DCMAKE_BUILD_TYPE=Release -DDYNNSUPDATE_CONFIG_FILE=$DIR/dyn-nsupdate.conf
   make
 
 This should compile the binary ``dyn-nsupdate``. If you want to put the files in 
 another directory, change the configuration file name accordingly. You can now 
 install it and the sample configuration file, and set their permissions::
 
-  sudo install dyn-nsupdate /var/lib/bind/dyn-nsupdate -o bind -g bind -m +rx,u+ws
-  sudo install ../../dyn-nsupdate.conf /var/lib/bind/dyn-nsupdate.conf -o bind -g bind -m u+rw
+  sudo install dyn-nsupdate $DIR/dyn-nsupdate -o bind -g bind -m +rx,u+ws
+  sudo install ../../dyn-nsupdate.conf.dist $DIR/dyn-nsupdate.conf -o bind -g bind -m u+rw
 
 Finally, edit the config file. The format should be pretty self-explanatory. In 
-particular, *change the password*!
+particular, **change the password**!
 
 Now, let's go on with the CGI scripts. They are using Python 2, so make sure you 
 have that installed. There are two scripts: One is used for clients to detect 
@@ -73,7 +75,48 @@ path in the ``update`` CGI script accordingly.
 That's it! Your server is now configured. You can use ``curl`` to test your 
 setup::
 
-  curl 'https://ns.example.com/update?domain=tests.dyn.example.com&password=some_secure_password&ip=127.0.0.1'
+  DOMAIN=test.dyn.example.com
+  PW=some_secure_password
+  curl 'https://ns.example.com/update?domain=$DOMAIN&password=$PW&ip=127.0.0.1'
+
+
+Client setup (using the script)
+-------------------------------
+
+You can find the client script at ``client-scripts/dyn-ns-client``. It requires 
+Python 3. Copy that script to the machine that should be available under the 
+dynamic domain. Then change the configuration section at the top to match your 
+setup. Note that the script can update a list of domain names, in case you need 
+the machine to have several names (it is preferable to use a CNAME instead, this 
+will reduce the number of updates performed in the zone). The ``serverIPv4`` and 
+``serverIPv6`` are only used if IPv4/IPv6 is enabled. These machines must be 
+available with that protocol only, otherwise it is not possible to reliably 
+detect the current external address.
+
+To run the script regularly, simply set up a cronjob. You can do so by running 
+``crontab -e``, and add a line as follows::
+
+  */15 * * * * /home/user/dyn-ns-client
+
+This sets the update interval to 15min. If your IP address changes daily, you 
+may want to reduce this to 5min to have a smaller timeframe during which your 
+server is not available.
+
+Client setup (using a router)
+-----------------------------
+
+Some routers are able to perform the update of the domain names themselves. The 
+FritzBox is known to be supported. To configure it to tell your server about the 
+current IP address, go to the DynDNS configuration section of the FritzBox and 
+choose the "custom" DynDNS provider. Then enter the following settings:
+
+- Update-URL: ``https://ns.example.com/update?domain=<domain>&password=<pass>&ip=<ipaddr>``
+- Domain Name: ``test.dyn.example.com``
+- User Name: ``just_something``
+- Password: ``some_secure_password``
+
+Note that the user name is ignored.
+
 
 
 Source, License