DNS resolver mixes IPv6 and IPv4 caches
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
In our network we have a DNS server that resolves some names to local addresses, while the same names are resolved to our public IP when public DNSs are used. For instance (using fictitious names and IPs), xyz.mydomain.com resolves to the public IP 65.254.242.180 when using an external DNS server, but resolves to 192.168.0.14 when using our internal DNS server (which all our computers are told to use via DHCP).
This used to work fine until a somewhat recent update in Ubuntu 17.10. Now, xyz.domain.com almost always resolves to the public IP instead of the internal IP. Interestingly, restarting the systemd-resolved service fixes the problem for a while (from a few seconds to a few minutes). Right after restarting the service, the dig command reports the expected internal IP, but after a while it gets back to reporting the public IP. Forcing the dig command to query our DNS server instead of the local resolver returns the correct IP.
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: systemd 234-2ubuntu9
ProcVersionSign
Uname: Linux 4.12.0-13-generic x86_64
ApportVersion: 2.20.7-0ubuntu1
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Sep 13 13:34:50 2017
InstallationDate: Installed on 2015-01-23 (963 days ago)
InstallationMedia: Ubuntu-GNOME 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
MachineType: LENOVO 20266
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
UpgradeStatus: Upgraded to artful on 2017-06-15 (90 days ago)
dmi.bios.date: 03/30/2015
dmi.bios.vendor: LENOVO
dmi.bios.version: 76CN43WW
dmi.board.
dmi.board.name: Yoga2
dmi.board.vendor: LENOVO
dmi.board.version: 31900058STD
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.family: IDEAPAD
dmi.product.name: 20266
dmi.product.
dmi.sys.vendor: LENOVO
Maybe interesting: systemd-resolve --status eth2 always reports the correct, internal DNS server, even though names are incorrectly resolved to their public IPs (I tried resolving with both dig and systemd-resolve).
gpothier@tadzim3:~$ systemd-resolve --status eth2
Link 3 (eth2)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 192.168.0.2
DNS Domain: ozone.caligrafix.cl
Also, sudo systemd-resolve --flush-caches temporarily solves the problem, in the same way restarting the service does.