Objective
For personal use, I need to add a custom server running on 127.0.0.1#5354
that resolves queries for .hyperboria
domains.
What I've done
There used to be a file called /etc/resolv.conf
that now says,
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
So, it seems that since systemd
is the main responsible for everything, I should look into systemd-resolved
service/configuration.
I could just edit the NetworkManager WiFi settings in GNOME to add a manual DNS server on my connected network, but that doesn't apply for every network (just the one I've edited). Plus, I couldn't control which domains solve with each server, and I don't know which files are being edited behind the scenes.
On dnsmasq
I think I could just add this line to its config, server=/hyperboria/127.0.0.1#5354
, but dnsmasq is not running, and if it would, I've found out that it is wrapped by NetworkManager or something similar and I wouldn't know if I should add a file into /etc/NetworkManager/dnsmasq.d/
or edit /etc/dnsmasq.conf
.
Other possible configurations are,
/etc/network/interfaces
# not sure how legacy it is these days/etc/resolvconf/resolv.conf.d/base|head|tail
Anyway, everything seems to rely on systemd-resolved
. How could achieve this?
Try editing
/etc/systemd/resolved.conf
file. Also don't forget to restart the appropriate service bysudo systemctl restart systemd-resolved.service
.Note that:
/etc/network/interfaces
/etc/resolv.conf
are deprecated now.