Custom Dns
LogZilla documentation for Custom Dns
Specifying custom DNS servers
Configure Docker’s DNS so all LogZilla containers use the desired resolvers.
-
Create or edit
/etc/docker/daemon.json
on the host. -
Add DNS settings (JSON):
json{ "dns": ["1.2.3.4", "5.6.7.8"], "dns-search": ["example.com"] }
Notes:
- Replace the IPs and domain with values for the environment.
- Keep the file valid JSON; merge with existing keys if present.
- Restarting Docker will interrupt running containers. Plan a short maintenance window.
-
Restart Docker:
bashsudo systemctl restart docker
Custom host mappings (without changing DNS)
When DNS reverse lookups are unavailable or specific overrides are needed,
configure static host mappings for LogZilla containers using
/etc/logzilla/hosts.in
(loaded into container /etc/hosts
).
-
Create or edit
/etc/logzilla/hosts.in
on the host. Format matches/etc/hosts
(multiple names per line allowed):text1.2.3.4 foo.bar.baz 2.3.4.5 baz.lab.com 10.11.12.13 somedevice somedevice.foo.com
-
Restart affected container(s) to apply the mapping. For syslog:
bashlogzilla restart -c syslog
-
Verify inside the container that the entry exists:
bashdocker exec -ti lz_syslog cat /etc/hosts
The hosts.in
file is read by LogZilla during container (re)creation and
populates container extra_hosts
. Update the file and restart relevant
containers whenever mappings change.