Skip to content

Bug: Recursive CNAME records not working #691

@Sajito

Description

@Sajito

What is Happening

It seems like recursive dns records are not resolved correctly.
In my config I have a wildcard entry on .vm, which is a cname to host.docker. This cname is working fine and resolved correctly.
When I add another domain, which is a cname to test.vm, then the cname chain is correctly resolved, but the final ip is not received.

Lookup results
~>  nslookup test.vm
Server:         172.157.5.249
Address:        172.157.5.249#53

test.vm canonical name = host.docker.
Name:   host.docker
Address: 172.157.5.1

~>  nslookup example.com
Server:         172.157.5.249
Address:        172.157.5.249#53

example.com     canonical name = test.vm.
test.vm canonical name = host.docker.
The config I'm using.
{
  "version" : 3,
  "server" : {
    "host" : "0.0.0.0",
    "dns" : {
      "port" : 53,
      "noEntriesResponseCode" : 2,
      "protocol" : "UDP_TCP"
    },
    "doh" : null,
    "web" : {
      "port" : 5380
    }
  },
  "solver" : {
    "remote" : {
      "active" : false,
      "dnsServers" : [ "8.8.8.8:53" ],
      "circuitBreaker" : {
        "failureRateThreshold" : 21.0,
        "minimumNumberOfCalls" : 50,
        "permittedNumberOfCallsInHalfOpenState" : 10,
        "type" : "CANARY_RATE_THRESHOLD"
      }
    },
    "docker" : {
      "registerContainerNames" : true,
      "domain" : "docker",
      "hostMachineFallback" : false,
      "dpsNetwork" : {
        "name" : "dps",
        "autoCreate" : true,
        "autoConnect" : true,
        "configs" : [ {
          "subNet" : "172.157.0.0/16",
          "ipRange" : "172.157.5.0/24",
          "gateway" : "172.157.5.1"
        }, {
          "subNet" : "fc00:5c6f:db50::/64",
          "ipRange" : null,
          "gateway" : "fc00:5c6f:db50::1"
        } ]
      },
      "networks" : {
        "preferred" : {
          "names" : null,
          "overrideDefault" : false
        }
      },
      "dockerDaemonUri" : "unix:///var/run/docker.sock"
    },
    "system" : {
      "hostMachineHostname" : "host.docker"
    },
    "local" : {
      "activeEnv" : "config",
      "envs" : [ {
        "name" : "config",
        "hostnames" : [ {
          "type" : "CNAME",
          "hostname" : ".vm",
          "target" : "host.docker",
          "ip" : null,
          "ttl" : 60
        }, {
          "type" : "CNAME",
          "hostname" : "example.com",
          "target" : "test.vm",
          "ip" : null,
          "ttl" : 60
        }, {
          "type" : "CNAME",
          "hostname" : ".local.dev",
          "target" : "host.docker",
          "ip" : null,
          "ttl" : 60
        } ]
      } ]
    },
    "stub" : {
      "domainName" : "stub"
    }
  },
  "defaultDns" : {
    "active" : true,
    "resolvConf" : {
      "paths" : "/host/etc/resolv.conf",
      "overrideNameServers" : false
    }
  },
  "log" : {
    "level" : "DEBUG",
    "file" : "console"
  }
}

What is Expected

I expect a lookup on example.com to return the same result as a lookup on test.vm.

Specs

  • Docker Version:
    Client:
     Version:           29.3.0
     API version:       1.54
     Go version:        go1.26.1-X:nodwarf5
     Git commit:        5927d80c76
     Built:             Fri Mar  6 21:02:20 2026
     OS/Arch:           linux/amd64
     Context:           default
    
    Server:
     Engine:
      Version:          29.3.0
      API version:      1.54 (minimum version 1.40)
      Go version:       go1.26.1-X:nodwarf5
      Git commit:       83bca512aa
      Built:            Fri Mar  6 21:02:20 2026
      OS/Arch:          linux/amd64
      Experimental:     false
     containerd:
      Version:          v2.2.1
      GitCommit:        dea7da592f5d1d2b7755e3a161be07f43fad8f75.m
     runc:
      Version:          1.4.0
      GitCommit:        
     docker-init:
      Version:          0.19.0
      GitCommit:        de40ad0
    
  • DPS Version:
    • Docker image: defreitas/dns-proxy-server:5.9.0
  • OS: Arch Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions