Commit 0bbad483dbdb2fda0524249599f285ab8dd1e15d

Authored by Frederik Lindenaar
1 parent baef00dd

Fixed minor markdown layout issues with Gitlab and closed #4

Showing 1 changed file with 21 additions and 21 deletions
README.md
@@ -51,15 +51,15 @@ The setup of this solution consists of the following steps: @@ -51,15 +51,15 @@ The setup of this solution consists of the following steps:
51 1. Ensure that the Perl modules CGI and Net::DNS are installed. 51 1. Ensure that the Perl modules CGI and Net::DNS are installed.
52 * on Debian/Ubuntu linux this can be done by: 52 * on Debian/Ubuntu linux this can be done by:
53 53
54 - ``` 54 + ~~~
55 sudo apt-get install libcgi-pm-perl libnet-dns-perl 55 sudo apt-get install libcgi-pm-perl libnet-dns-perl
56 - ``` 56 + ~~~
57 57
58 * or directly from CPAN (assuming that is installed): 58 * or directly from CPAN (assuming that is installed):
59 59
60 - ``` 60 + ~~~
61 cpan CGI Net::DNS 61 cpan CGI Net::DNS
62 - ``` 62 + ~~~
63 63
64 2. Install the file `dyndns.pl` either in your cgi-bin directory or in a 64 2. Install the file `dyndns.pl` either in your cgi-bin directory or in a
65 separate folder 65 separate folder
@@ -74,21 +74,21 @@ The setup of this solution consists of the following steps: @@ -74,21 +74,21 @@ The setup of this solution consists of the following steps:
74 server's cgi-bin directory) add the following line to your Apache virtual 74 server's cgi-bin directory) add the following line to your Apache virtual
75 host configuration (replacing `[INSTALL_DIR]` with the install directory): 75 host configuration (replacing `[INSTALL_DIR]` with the install directory):
76 76
77 - ``` 77 + ~~~
78 ScriptAlias /dyndns [INSTALL_DIR]/dyndns.pl 78 ScriptAlias /dyndns [INSTALL_DIR]/dyndns.pl
79 - ``` 79 + ~~~
80 80
81 in case you have installed the script in a non-standard folder, you will 81 in case you have installed the script in a non-standard folder, you will
82 also need the following to make this work on Apache 2.4 (again replacing 82 also need the following to make this work on Apache 2.4 (again replacing
83 `[INSTALL_DIR]` with the install directory): 83 `[INSTALL_DIR]` with the install directory):
84 84
85 - ``` 85 + ~~~
86 <Directory [INSTALL_DIR]/> 86 <Directory [INSTALL_DIR]/>
87 AllowOverride None 87 AllowOverride None
88 Options +ExecCGI -MultiViews -Indexes 88 Options +ExecCGI -MultiViews -Indexes
89 Require all granted 89 Require all granted
90 </Directory> 90 </Directory>
91 - ``` 91 + ~~~
92 92
93 reload apache with `/etc/init.d/apache reload` to make the script 93 reload apache with `/etc/init.d/apache reload` to make the script
94 available at <http://myserver.mydomain.tld/dyndns>. 94 available at <http://myserver.mydomain.tld/dyndns>.
@@ -102,7 +102,7 @@ The setup of this solution consists of the following steps: @@ -102,7 +102,7 @@ The setup of this solution consists of the following steps:
102 (e.g. `include "named.dyndns.conf";`). For a basic dynamic DNS setup a 102 (e.g. `include "named.dyndns.conf";`). For a basic dynamic DNS setup a
103 configuration like below is required: 103 configuration like below is required:
104 104
105 - ``` 105 + ~~~
106 // Define the keys for DynDNS 106 // Define the keys for DynDNS
107 key "dyndns.mydomain.tld" { 107 key "dyndns.mydomain.tld" {
108 algorithm hmac-md5; secret "QdDJC7QVYmsCxgWoSAUmBg=="; 108 algorithm hmac-md5; secret "QdDJC7QVYmsCxgWoSAUmBg==";
@@ -125,7 +125,7 @@ The setup of this solution consists of the following steps: @@ -125,7 +125,7 @@ The setup of this solution consists of the following steps:
125 grant siteuser name site.dyndns.mydomain.tld ANY; 125 grant siteuser name site.dyndns.mydomain.tld ANY;
126 }; 126 };
127 }; 127 };
128 - ``` 128 + ~~~
129 129
130 The above defines a domain zone file `dyndns/db.dyndns.mydomain.tld` with 130 The above defines a domain zone file `dyndns/db.dyndns.mydomain.tld` with
131 two signer/keys. *siteuser* only can update `site.dyndns.mydomain.tld` 131 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: @@ -139,20 +139,20 @@ The setup of this solution consists of the following steps:
139 139
140 * to generate a new key *dyndns.mydomain.tld*: 140 * to generate a new key *dyndns.mydomain.tld*:
141 141
142 - ``` 142 + ~~~
143 ddns-confgen -a hmac-md5 -k dyndns.mydomain.tld -z dyndns.mydomain.tld 143 ddns-confgen -a hmac-md5 -k dyndns.mydomain.tld -z dyndns.mydomain.tld
144 - ``` 144 + ~~~
145 145
146 * generate the required configuration for *siteuser* (or any new user): 146 * generate the required configuration for *siteuser* (or any new user):
147 147
148 - ``` 148 + ~~~
149 ddns-confgen -a hmac-md5 -k siteuser -s site.dyndns.mydomain.tld 149 ddns-confgen -a hmac-md5 -k siteuser -s site.dyndns.mydomain.tld
150 - ``` 150 + ~~~
151 151
152 6. Generate an initial zone file like the one below for the dyndns domain in 152 6. Generate an initial zone file like the one below for the dyndns domain in
153 the location specified in the config file above. 153 the location specified in the config file above.
154 154
155 - ``` 155 + ~~~
156 $TTL 3600 ; 1 hour 156 $TTL 3600 ; 1 hour
157 @ IN SOA auth.dns.mydomain.tld. hostmaster.mydomain.tld. ( 157 @ IN SOA auth.dns.mydomain.tld. hostmaster.mydomain.tld. (
158 2019000001 ; serial 158 2019000001 ; serial
@@ -164,7 +164,7 @@ The setup of this solution consists of the following steps: @@ -164,7 +164,7 @@ The setup of this solution consists of the following steps:
164 TXT "Dynamic DNS zone for mydomain.tld" 164 TXT "Dynamic DNS zone for mydomain.tld"
165 165
166 site A 1.2.3.4 166 site A 1.2.3.4
167 - ``` 167 + ~~~
168 168
169 Please note that Bind will rewrite this file and you need to be careful 169 Please note that Bind will rewrite this file and you need to be careful
170 with it. Entries do not need to exist initially, as long as the signer/key 170 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 @@ -507,7 +507,7 @@ DDNS registrations using a custom URL. The Basic format for the registration
507 URL to register is: 507 URL to register is:
508 508
509 ~~~ 509 ~~~
510 -https://SERVER/cgi-bin/dyndns/update?host=HOSTNAME&ip=IPADDRESS&secret=KEY` 510 +https://SERVER/cgi-bin/dyndns/update?host=HOSTNAME&ip=IPADDRESS&secret=KEY
511 ~~~ 511 ~~~
512 512
513 Check the [list of parameters supported](req_params) for all available options, 513 Check the [list of parameters supported](req_params) for all available options,
@@ -552,13 +552,13 @@ https://SERVER/cgi-bin/dyndns/view?host @@ -552,13 +552,13 @@ https://SERVER/cgi-bin/dyndns/view?host
552 ------------------------------------------- 552 -------------------------------------------
553 For Cisco routers add the following config: 553 For Cisco routers add the following config:
554 554
555 -``` 555 +~~~
556 ip ddns update method DYNDNS 556 ip ddns update method DYNDNS
557 HTTP 557 HTTP
558 add https://SERVER/cgi-bin/dyndns/update?host=<h>&ip=<a>&secret=SECRET 558 add https://SERVER/cgi-bin/dyndns/update?host=<h>&ip=<a>&secret=SECRET
559 remove https://SERVER/cgi-bin/dyndns/delete?host=<h>&secret=SECRET 559 remove https://SERVER/cgi-bin/dyndns/delete?host=<h>&secret=SECRET
560 interval maximum 0 1 0 0 560 interval maximum 0 1 0 0
561 -``` 561 +~~~
562 562
563 replacing `SERVER` for the host the script is installed on and `SECRET` 563 replacing `SERVER` for the host the script is installed on and `SECRET`
564 for a DNS key authorized to update the record. The cisco router will replace <a> 564 for a DNS key authorized to update the record. The cisco router will replace <a>
@@ -566,11 +566,11 @@ and &lt;h&gt; with the IPv4 address and hostname. @@ -566,11 +566,11 @@ and &lt;h&gt; with the IPv4 address and hostname.
566 566
567 To setup interface `Dialer0` to register as `hostname.dyndns.mydomain.tld` add: 567 To setup interface `Dialer0` to register as `hostname.dyndns.mydomain.tld` add:
568 568
569 -``` 569 +~~~
570 interface Dialer0 570 interface Dialer0
571 ip ddns update hostname hostname.dyndns.mydomain.tld 571 ip ddns update hostname hostname.dyndns.mydomain.tld
572 ip ddns update DYNDNS 572 ip ddns update DYNDNS
573 -``` 573 +~~~
574 574
575 Which instructs to register using the address of Dialer0 as soon as that is up 575 Which instructs to register using the address of Dialer0 as soon as that is up
576 or changes (this also works for non-dialer devices). 576 or changes (this also works for non-dialer devices).