4 ms·
Here is what I do to take back control of host resolution which was probably the intended goal. First of all, /etc/nsswitch.conf set the priorities. For instan
by idoubtit 6y ago
Here is what I do to take back control of host resolution which was probably the intended goal.
First of all, /etc/nsswitch.conf set the priorities. For instance the line `hosts: files myhostname mymachines dns` would exclude systemd-resolved (aliased to `resolve`) and try to identify containers before querying DNS. See the man.
I used to use resolvconf in order to merge my local rules with those set automatically by DHCP. Nowadays I have a dnsmasq daemon running a dns proxy. This way I can set rules so that some domains are linked to special DNS (e.g. *.debian.org should be resolved through 1.1.1.1 instead of the default that the DHCP set). And added benefit is the filtering of ad domains.