InterviewSolution
| 1. |
Solve : Locking-in DNS Servers in systemd? |
|
Answer» Hi there! My question is: How can I "lock down" the IP addy for the DNS service I'd like to use on a Mint19 system? It uses the new systemd. I haven't "learned" this new-fangled systemd stuff. This course is over 6 hours in length and will cover all aspects of IPv4Get even more and mare stuff by searching for: Everything you ever wanted to know about IP addresses Are you restarting the appropriate services after editing resolv.conf? $ sudo systemctl daemon-reload $ sudo systemctl RESTART systemd-networkd $ sudo systemctl restart systemd-resolved What may be occurring is that dig uses the configuration file directly, but the configuration is being REWRITTEN by some other part of the system because the service was not restarted. Another thought: there is a per-network adapter configuration found in /etc/systemd/network/ for each adapter, which may include DNS information- reconnecting might be overriding the standard DNS resolver setting with the one set in the network adapter config.BC_Programmer, Thank you for your respectful and earnest response! When you said,What may be occurring is that dig uses the configuration file directly, but the configuration is being rewritten by some other part of the system because the service was not restarted." I believe is truly spot-on. I looked in the /etc/systemd/network/ directory... has nothing in it. Empty. So... I had spent 5 or 6 hours trying to find the answer BEFORE I came to my friends at CH. And after I made the above post, I went back to searching the Web for another 2-3 hours. And lo-and-behold, I did manage to find this code that does "lock" Debian DNS configurations, which I will post in order to help others that may need this info in the future: create /etc/dhcp/dhclient-enter-hooks.d/nodnsupdate file, and add this script to it: #!/bin/sh make_resolv_conf(){ : } The final steps are to save and CLOSE the file, then set permissions: chmod +x /etc/dhcp/dhclient-enter-hooks.d/nodnsupdate Again, BC, I appreciate your help. At least you take the time to try and understand the questions put to you, as your response illustrates. CHEERS, mate! |
|