This is still happening with 17.10 final. I have been digging a bit and found something that makes me think that this is a caching / IPv6 issue. Attached is the screenshot of a Wireshark capture of the DNS packets on all interfaces on the affected machine (the IP address of the machine is 192.168.0.154).
When querying a hostname that should be resolved to a local network address (in this case odoo.caligrafix.cl), the resolver makes two requests to our local DNS server 192.168.0.2 (and not to any external DNS server, as I first thought): 1. The request for odoo.caligrafix.cl 2. A request for o3.caligrafix.cl. The second request is made before receiving the response to the first request. This second request can be explained by the fact that outside of our network, the name odoo.caligrafix.cl resolves to a CNAME o3.caligrafix.cl, and for some reason the resolver uses this cached information instead of waiting for the result of the first request. The response to the first request, which correctly indicates the expected local network address, seems to be discarded, and the result of subsequent requests that resolves to our public address trough a chain of CNAMES, is used instead. The funny thing is that after flushing the resolver's cache, the resolver also makes two requests to our local DNS server, but both with the name odoo.caligrafix.cl, and gets the correct answer. But then it makes a request for the AAAA (IPv6) record, and gets the chain the CNAME records that lead to our public IP. So it seems that somehow the IPv6 and IPv4 caches get mixed up afterwards. Although I guess I could (and will attempt to) mitigate the issue by configuring the AAAA record differently on our DNS server, I think the current behavior of the resolver is incorrect, as it uses cached info for an IPv6 record when querying an IPv4 record. ** Attachment added: "Wireshark capture of failed resolution" https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1716976/+attachment/4997137/+files/Screenshot%20from%202017-10-26%2018-22-20.png -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1716976 Title: DNS resolver mixes IPv6 and IPv4 caches To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1716976/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs