Interview Prep/Linux/Networking, SSH and remote access

Your app needs to resolve internal names like `db.internal` that aren't in public DNS. What options do you have on the host?

IntermediateScenarioNetworking, SSH and remote access
Answer

Situation read → Point the resolver at internal DNS, or use split DNS.

What I'd do →

  1. Best: configure the internal DNS servers via DHCP or NetworkManager (ipv4.dns).
  2. With systemd-resolved, route only the internal domain to internal DNS:
sudo resolvectl dns eth1 10.0.0.2
sudo resolvectl domain eth1 '~internal'

(persist in NetworkManager or a .network file). 3. Quick fix for one or two hosts: /etc/hosts.

Why → Split DNS sends *.internal to internal servers and everything else to the normal resolver.

Interview tip → Mention /etc/nsswitch.conf controls whether /etc/hosts or DNS is consulted first.

All Linux questions Roadmap: Linux

More on Networking, SSH and remote access