Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
diy_rfc2136_dyndns_with_bind [29.10.2013 14:01] – Pascal Suter | diy_rfc2136_dyndns_with_bind [25.06.2021 08:17] – [DIY RFC2136 dyndns with bind] Pascal Suter | ||
---|---|---|---|
Line 22: | Line 22: | ||
900 | 900 | ||
600 | 600 | ||
- | 2600 ; expire (43 minutes 20 seconds) | + | 604800 |
30 | 30 | ||
) | ) | ||
Line 41: | Line 41: | ||
}; | }; | ||
}; | }; | ||
- | </ | + | </ |
* edit your main named.conf file, usually in / | * edit your main named.conf file, usually in / | ||
* create the " | * create the " | ||
Line 79: | Line 79: | ||
</ | </ | ||
* now use the script to add your first hostname. < | * now use the script to add your first hostname. < | ||
+ | ===== script to remove hosts ===== | ||
+ | optionally you can also create a little script to remove hosts just as easily. create a file called remove_hosts.sh with the following contents< | ||
+ | #!/bin/bash | ||
+ | if [ -z " | ||
+ | echo " | ||
+ | echo " | ||
+ | exit 1 | ||
+ | fi | ||
+ | cd / | ||
+ | hostname=${1}.dyn.mydomain.ch. | ||
+ | echo "old keys.conf entry: " | ||
+ | grep ${hostname} keys.conf | ||
+ | echo " | ||
+ | cat named.conf | sed -e "/ | ||
+ | cat keys.conf | sed -e "/^key ${hostname}.*$/ | ||
+ | echo " | ||
+ | / | ||
+ | echo " | ||
+ | grep "key " named.conf | awk '{ print $2; }' | tr -d ";" | ||
+ | </ | ||
+ | make it executable and run it to remove hotsts. **warning** make a backup of your keys.conf and your named.conf file before testing this :) | ||
+ | ./ | ||
+ |