Fixed minor markdown layout issues with Gitlab and closed #4

This commit is contained in:
2019-10-26 22:06:07 +02:00
parent baef00dddc
commit 0bbad483db

View File

@@ -51,15 +51,15 @@ The setup of this solution consists of the following steps:
1. Ensure that the Perl modules CGI and Net::DNS are installed. 1. Ensure that the Perl modules CGI and Net::DNS are installed.
* on Debian/Ubuntu linux this can be done by: * on Debian/Ubuntu linux this can be done by:
``` ~~~
sudo apt-get install libcgi-pm-perl libnet-dns-perl sudo apt-get install libcgi-pm-perl libnet-dns-perl
``` ~~~
* or directly from CPAN (assuming that is installed): * or directly from CPAN (assuming that is installed):
``` ~~~
cpan CGI Net::DNS cpan CGI Net::DNS
``` ~~~
2. Install the file `dyndns.pl` either in your cgi-bin directory or in a 2. Install the file `dyndns.pl` either in your cgi-bin directory or in a
separate folder separate folder
@@ -74,21 +74,21 @@ The setup of this solution consists of the following steps:
server's cgi-bin directory) add the following line to your Apache virtual server's cgi-bin directory) add the following line to your Apache virtual
host configuration (replacing `[INSTALL_DIR]` with the install directory): host configuration (replacing `[INSTALL_DIR]` with the install directory):
``` ~~~
ScriptAlias /dyndns [INSTALL_DIR]/dyndns.pl ScriptAlias /dyndns [INSTALL_DIR]/dyndns.pl
``` ~~~
in case you have installed the script in a non-standard folder, you will in case you have installed the script in a non-standard folder, you will
also need the following to make this work on Apache 2.4 (again replacing also need the following to make this work on Apache 2.4 (again replacing
`[INSTALL_DIR]` with the install directory): `[INSTALL_DIR]` with the install directory):
``` ~~~
<Directory [INSTALL_DIR]/> <Directory [INSTALL_DIR]/>
AllowOverride None AllowOverride None
Options +ExecCGI -MultiViews -Indexes Options +ExecCGI -MultiViews -Indexes
Require all granted Require all granted
</Directory> </Directory>
``` ~~~
reload apache with `/etc/init.d/apache reload` to make the script reload apache with `/etc/init.d/apache reload` to make the script
available at <http://myserver.mydomain.tld/dyndns>. available at <http://myserver.mydomain.tld/dyndns>.
@@ -102,7 +102,7 @@ The setup of this solution consists of the following steps:
(e.g. `include "named.dyndns.conf";`). For a basic dynamic DNS setup a (e.g. `include "named.dyndns.conf";`). For a basic dynamic DNS setup a
configuration like below is required: configuration like below is required:
``` ~~~
// Define the keys for DynDNS // Define the keys for DynDNS
key "dyndns.mydomain.tld" { key "dyndns.mydomain.tld" {
algorithm hmac-md5; secret "QdDJC7QVYmsCxgWoSAUmBg=="; algorithm hmac-md5; secret "QdDJC7QVYmsCxgWoSAUmBg==";
@@ -125,7 +125,7 @@ The setup of this solution consists of the following steps:
grant siteuser name site.dyndns.mydomain.tld ANY; grant siteuser name site.dyndns.mydomain.tld ANY;
}; };
}; };
``` ~~~
The above defines a domain zone file `dyndns/db.dyndns.mydomain.tld` with The above defines a domain zone file `dyndns/db.dyndns.mydomain.tld` with
two signer/keys. *siteuser* only can update `site.dyndns.mydomain.tld` two signer/keys. *siteuser* only can update `site.dyndns.mydomain.tld`
@@ -139,20 +139,20 @@ The setup of this solution consists of the following steps:
* to generate a new key *dyndns.mydomain.tld*: * to generate a new key *dyndns.mydomain.tld*:
``` ~~~
ddns-confgen -a hmac-md5 -k dyndns.mydomain.tld -z dyndns.mydomain.tld ddns-confgen -a hmac-md5 -k dyndns.mydomain.tld -z dyndns.mydomain.tld
``` ~~~
* generate the required configuration for *siteuser* (or any new user): * generate the required configuration for *siteuser* (or any new user):
``` ~~~
ddns-confgen -a hmac-md5 -k siteuser -s site.dyndns.mydomain.tld ddns-confgen -a hmac-md5 -k siteuser -s site.dyndns.mydomain.tld
``` ~~~
6. Generate an initial zone file like the one below for the dyndns domain in 6. Generate an initial zone file like the one below for the dyndns domain in
the location specified in the config file above. the location specified in the config file above.
``` ~~~
$TTL 3600 ; 1 hour $TTL 3600 ; 1 hour
@ IN SOA auth.dns.mydomain.tld. hostmaster.mydomain.tld. ( @ IN SOA auth.dns.mydomain.tld. hostmaster.mydomain.tld. (
2019000001 ; serial 2019000001 ; serial
@@ -164,7 +164,7 @@ The setup of this solution consists of the following steps:
TXT "Dynamic DNS zone for mydomain.tld" TXT "Dynamic DNS zone for mydomain.tld"
site A 1.2.3.4 site A 1.2.3.4
``` ~~~
Please note that Bind will rewrite this file and you need to be careful Please note that Bind will rewrite this file and you need to be careful
with it. Entries do not need to exist initially, as long as the signer/key with it. Entries do not need to exist initially, as long as the signer/key
@@ -507,7 +507,7 @@ DDNS registrations using a custom URL. The Basic format for the registration
URL to register is: URL to register is:
~~~ ~~~
https://SERVER/cgi-bin/dyndns/update?host=HOSTNAME&ip=IPADDRESS&secret=KEY` https://SERVER/cgi-bin/dyndns/update?host=HOSTNAME&ip=IPADDRESS&secret=KEY
~~~ ~~~
Check the [list of parameters supported](req_params) for all available options, Check the [list of parameters supported](req_params) for all available options,
@@ -552,13 +552,13 @@ https://SERVER/cgi-bin/dyndns/view?host
------------------------------------------- -------------------------------------------
For Cisco routers add the following config: For Cisco routers add the following config:
``` ~~~
ip ddns update method DYNDNS ip ddns update method DYNDNS
HTTP HTTP
add https://SERVER/cgi-bin/dyndns/update?host=<h>&ip=<a>&secret=SECRET add https://SERVER/cgi-bin/dyndns/update?host=<h>&ip=<a>&secret=SECRET
remove https://SERVER/cgi-bin/dyndns/delete?host=<h>&secret=SECRET remove https://SERVER/cgi-bin/dyndns/delete?host=<h>&secret=SECRET
interval maximum 0 1 0 0 interval maximum 0 1 0 0
``` ~~~
replacing `SERVER` for the host the script is installed on and `SECRET` replacing `SERVER` for the host the script is installed on and `SECRET`
for a DNS key authorized to update the record. The cisco router will replace <a> for a DNS key authorized to update the record. The cisco router will replace <a>
@@ -566,11 +566,11 @@ and <h> with the IPv4 address and hostname.
To setup interface `Dialer0` to register as `hostname.dyndns.mydomain.tld` add: To setup interface `Dialer0` to register as `hostname.dyndns.mydomain.tld` add:
``` ~~~
interface Dialer0 interface Dialer0
ip ddns update hostname hostname.dyndns.mydomain.tld ip ddns update hostname hostname.dyndns.mydomain.tld
ip ddns update DYNDNS ip ddns update DYNDNS
``` ~~~
Which instructs to register using the address of Dialer0 as soon as that is up Which instructs to register using the address of Dialer0 as soon as that is up
or changes (this also works for non-dialer devices). or changes (this also works for non-dialer devices).