Affected versions: FreeBSD 14

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Host cannot resolve domain names, breaking package fetch and service integrations.

Environment & Reproduction

Appears after DHCP changes or manual edits overwritten at boot.

cat /etc/resolv.conf
host pkg.FreeBSD.org
pkg update

Root Cause Analysis

Incorrect nameserver entries or conflicting resolver ownership causes failed lookups.

Quick Triage

Test direct resolver reachability and query behavior.

drill pkg.FreeBSD.org
ping -c 3 1.1.1.1
cat /etc/resolv.conf

Step-by-Step Diagnosis

Confirm whether DHCP client or local policy rewrites resolv.conf incorrectly.

grep -i resolv /var/log/messages | tail -n 40
cat /etc/dhclient.conf 2>/dev/null || true
service netif restart
cat /etc/resolv.conf
Illustrative mockup for freebsd-14 β€” terminal_or_shell
resolver diagnostics and lookup tests β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Set stable DNS servers and preserve resolver config according to policy.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

cat > /etc/resolv.conf <<'EOF'
nameserver 1.1.1.1
nameserver 8.8.8.8
search localdomain
EOF
chflags schg /etc/resolv.conf
Illustrative mockup for freebsd-14 β€” logs_or_journal
post-fix DNS validation output β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Configure dhclient supersede directives instead of immutable resolv.conf.

echo 'supersede domain-name-servers 1.1.1.1, 8.8.8.8;' >> /etc/dhclient.conf
service netif restart

Verification & Acceptance Criteria

Domain resolution works consistently and package updates complete.

drill freebsd.org
pkg update
fetch -qo /dev/null https://www.freebsd.org

Rollback Plan

Remove immutable flag and revert to DHCP-managed resolver if required.

chflags noschg /etc/resolv.conf
service netif restart

Prevention & Hardening

Document resolver ownership model and monitor DNS failures in system logs.

grep -iE 'resolver|dns|host not found' /var/log/messages | tail -n 50

Related to default route loss, pf outbound blocks, and upstream resolver outages.

Related tutorial: View the step-by-step tutorial for FreeBSD 14.

View all FreeBSD 14 tutorials on the Tutorials Hub β†’

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

FreeBSD resolver and dhclient documentation.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β€” we respond within one business day.