Difference between revisions of "Bind"
Jump to navigation
Jump to search
(Created page with "==Intro== Some notes how to setup a dynamic DNS... <br>Setup is based on Askarel's [https://github.com/askarel/dynaname dynaname] ==Requirements== ===Server=== apt-get instal...") |
m |
||
Line 16: | Line 16: | ||
git clone https://github.com/askarel/dynaname.git |
git clone https://github.com/askarel/dynaname.git |
||
==Setup== |
==Setup== |
||
+ | To create e.g. home.dyn.bar.org: |
||
cd dynaname |
cd dynaname |
||
+ | ./dynaname -G -H home.dyn.bar.org -S ns0.foo.org |
||
+ | Then copy ns0.foo.org/etc/bind/dynaname.conf to ns0.foo.org:/etc/bind/ |
||
+ | <br>and add a hook into ns0.foo.org:/etc/bind/named.conf: |
||
+ | include "/etc/bind/dynaname.conf" |
||
+ | I needed to set an absolute path to the file, so in dynaname.conf change |
||
+ | file "dyn/dyn.bar.org"; |
||
+ | to |
||
+ | file "/var/lib/bind/dyn/dyn.bar.org"; |
||
+ | |||
+ | For info dynaname.conf should look like: |
||
+ | <pre> |
||
+ | key home.dyn.bar.org { |
||
+ | algorithm HMAC-MD5; |
||
+ | secret "some secret..."; |
||
+ | }; |
||
+ | |||
+ | zone "dyn.bar.org" in { |
||
+ | type master; |
||
+ | file "/var/lib/bind/dyn/dyn.bar.org"; |
||
+ | update-policy { |
||
+ | grant home.dyn.bar.org name home.dyn.bar.org A AAAA TXT; |
||
+ | }; |
||
+ | }; |
||
+ | </pre> |
Revision as of 22:56, 3 June 2014
Intro
Some notes how to setup a dynamic DNS...
Setup is based on Askarel's dynaname
Requirements
Server
apt-get install bind9
This will be the nameserver ns0.foo.org for our dynamic subdomain dyn.bar.org so this has to be announced in the primary DNS of your bar.org domain:
dyn NS ns0.foo.org.
To test it:
dig @your.primary.dns.for.bar.org dyn.bar.org ;; AUTHORITY SECTION: dyn.bar.org. 10800 IN NS ns0.foo.org.
Client
apt-get install dnsutils bind9utils git clone https://github.com/askarel/dynaname.git
Setup
To create e.g. home.dyn.bar.org:
cd dynaname ./dynaname -G -H home.dyn.bar.org -S ns0.foo.org
Then copy ns0.foo.org/etc/bind/dynaname.conf to ns0.foo.org:/etc/bind/
and add a hook into ns0.foo.org:/etc/bind/named.conf:
include "/etc/bind/dynaname.conf"
I needed to set an absolute path to the file, so in dynaname.conf change
file "dyn/dyn.bar.org";
to
file "/var/lib/bind/dyn/dyn.bar.org";
For info dynaname.conf should look like:
key home.dyn.bar.org { algorithm HMAC-MD5; secret "some secret..."; }; zone "dyn.bar.org" in { type master; file "/var/lib/bind/dyn/dyn.bar.org"; update-policy { grant home.dyn.bar.org name home.dyn.bar.org A AAAA TXT; }; };