/
README
114 lines (78 loc) · 3.81 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
GETTING STARTED
The easiest way to install it as a package or run as a Docker container.
yum install ddns-update
or
docker run --name ddns-update -d lfarkas/ddns-update
MANUAL INSTALLATION
1. Copy ddns-update into /usr/bin/ddns-update
2. Link it NetworkManager's dispatcher.d ie:
ln -snf /usr/bin/ddns-update /etc/NetworkManager/dispatcher.d/50-ddns-update
3. Put your zone's key file into /etc/ddns-update/
4. Copy ddns-update.conf into /etc/ddns-update/
5. If you would like to change the default behaviour edit your configuration
file in /etc/ddns-update/ddns-update.conf
That's all!
6. If you don't use NetworkManager copy sample/ddns-update.cron into /etc/cron.d/
RUNNING MODE OF DDNS-UPDATE
There are many working mode for different requirements.
It's designed to use with NetworkManager although can be used without it.
1. Oneshot where you just would like to update once the DNS. Simple run:
ddns-update (/usr/bin/ddns-update)
2. You don't need to run it as a serice on any modern Linux OS which run
NetworkManager. Since in this case if NetworkManager detect or trigger
any changes it can re-run the tool so immediately update the DNS.
-------------- If you don't use NetworkManager ------------------
3. From cron where you can run it in a regular inteval eg every 5 minutes.
See in sample/ddns-update.cron
4. From dhclient or dhcpcd when an interface bring up.
See in sample/dhclient-exit-hooks or sample/dhcpcd-eth0.exe
5. And as the worse case you can run in daemon mode where you run it as a
system service with systemd or initscript (from the sample directory).
- Enable the service with:
systemctl enable ddns-update
or
chkconfig --add ddns-update
- Start the service
systemctl start ddns-update
or
service ddns-update start
WORKING MODE of DDNS-UPDATE
You can confiure to detect the external address of your machine (ie. the IP
address you see from the outdside) or detect any interface's IP address of the
OS and register it into the DNS.
For external IP address discovery different command can be used as the URL
grabber. Different site can be used as IP discovery service.
All other parameters like host, domain, name server name and TTL values can be
configured. All of these configuration (with a few others) can be found in the
main configuration file /etc/ddns-update/ddns-update.conf
Always try to run with minimal resource usage ie:
- using minimal network comminucation
- using basic shell commands
- only query required addresses
- only update DNS when changes detected.
USING DDNS-UPDATE WITH cron
If you have not configured ddns-update to use daemon-mode, you'll need to
configure cron to force an update once a month so that the DNS entry will
not become stale.
## configure cron to force an update twice a month
cp sample/ddns-update.cron /etc/cron.d/ddns-update
USING DDNS-UPDATE WITH dhcpcd-1.3.17
If you are using dhcpcd-1.3.17 or thereabouts, you can easily update
your DynDNS entry automatically every time your lease is obtained
or renewed by creating an executable file named:
/etc/dhcpc/dhcpcd-{your-interface}.exe
ie.:
cp sample/dhcpcd-eth0.exe /etc/dhcpc/dhcpcd-{your-interface}.exe
Other DHCP clients may have another method of calling out to programs
for updating DNS entries.
Alternatively, you may just configure ddns-update to operate as a daemon
and monitor your ethernet interface.
USING DDNS-UPDATE WITH dhclient
If you are using the ISC DHCP client (dhclient), you can update
your DynDNS entry automatically every time your lease is obtained
or renewed by creating an executable file named:
/etc/dhcp/dhclient-exit-hooks
ie.:
cp sample/dhclient-exit-hooks /etc/dhcp/dhclient-exit-hooks
Alternatively, you may just configure ddns-update to operate as a daemon
and monitor your ethernet interface.