-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
77 lines (55 loc) · 2.88 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
DynBind
2012 by Lutz-Peter Hooge
this script is intended for running a selfhosted dynamic dns service
it implements the update protocol used by dyn.com (see http://dyn.com/support/developers/api/perform-update/),
so it can be used in "FritzBox" and maybe other home routers to automatically perform updates.
on the back side it depends on BIND and the nsupdate tool to perform the updates to the zone file
REQUIREMENTS
- a server with a static ip for running the dns server
- bind9
- nsupdate (in ubunto this is part of the dnsutils package)
- apache + mod_php or something equivalent
INSTALLATION
0. make sure your "bind" serve is correctly set up.
In particular:
- the zone must allow updates (e.g. "allow-update {localhost;};" to allow local updates)
- the zone file must be writeble for the bind process
- beware of minimum TTL setting. if this is set to, like 3 days, your dynamic updates will not have much effect...
1. copy the included files somewhere where your webserver can access than.
2. copy the included dynbind.conf.example.xml to dynbind.conf.xml or /etc/dynbind.conf.xml and insert your settings (users, zone, name server etc, see comments there).
IMPORTANT: make sure for Apache "AllowOverride All" is enabled, or use other means to disallow the webserver from serving the config und log files to visitors!
Alternatively place the config in /etc/dynbind.conf.xml instead in the directory with the script
3. if everything is correct you should be able to make dns updates by calling the skript in your web browsers like this
http://yourdomain.com/DynBind/?hostname=thehosttoupdate.com
and entering your configured user credentials
CONFIGURATION FOR FritzBox
Use the following update url:
yourdomain.com/dynbind/?hostname=<domain>&myip=<ipaddr>&wildcard=1
replace "yourdomain.com" with your domain name, but leave the variables in brackets (<>) EXACTLY like this.
They will be replaced by the router.
Do NOT put the scheme (http://) or your username/password into the url field, this will not work (at least on my hardware)
CONFIG FILE EXAMPLES (for local test zone)
----/etc/named.conf.local--------------------------
zone "invalid.inv" IN {
type master;
file "/etc/bind/invalid.inv.zone";
allow-transfer { "none"; };
allow-update {localhost;};
allow-query {any;};
notify no;
};
---------------------------------------------------
----/etc/bind/invalid.inv.zone---------------------
$ORIGIN invalid.inv.
$TTL 3600
@ IN SOA ns.invalid.inv. lphooge.hoogi.de. (
2012062705 ; Serial
3H ; refresh after 3 hours
1H ; retry after 1 hour
1W ; expire after 1 week
1800) ; minimum TTL of 30min
; Name Server
IN NS ns.invalid.inv.
ns IN A 10.0.2.15
@ IN A 10.0.2.15
---------------------------------------------------