Resolver wildcard DNS - subdomains not working



  • In the custom options i have:

    server:include: /var/unbound/pfb_dnsbl.*conf
    local-zone: "testserver2.mydomain.net" redirect
    local-data: "testserver2.mydomain.net 86400 IN A 10.1.253.9"
    

    If i ping testserver2.mydomain.net i get the IP from my test server.
    But if i ping testsite.testserver2.mydomain.net i get the IP from the server in the wild (outside the LAN).


  • LAYER 8 Global Moderator

    And you sure you client didn't have it cached.. Make sure you clear your machines local cache..

    I just did a test case of this. with google..

    test.png

    And works just fine.

    $ dig test.www.google.com
    
    ; <<>> DiG 9.14.3 <<>> test.www.google.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23689
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;test.www.google.com.           IN      A
    
    ;; ANSWER SECTION:
    test.www.google.com.    86400   IN      A       10.1.253.9
    
    ;; Query time: 2 msec
    ;; SERVER: 192.168.3.10#53(192.168.3.10)
    ;; WHEN: Mon Jul 15 20:10:09 Central Daylight Time 2019
    ;; MSG SIZE  rcvd: 64
    

    But if ping it gets what it had cached

    $ ping www.google.com
    
    Pinging www.google.com [172.217.8.164] with 32 bytes of data:
    Reply from 172.217.8.164: bytes=32 time=13ms TTL=52
    Reply from 172.217.8.164: bytes=32 time=14ms TTL=52
    Reply from 172.217.8.164: bytes=32 time=15ms TTL=52
    Reply from 172.217.8.164: bytes=32 time=29ms TTL=52
    

    Flushed local cache.. And then works fine

    $ ping www.google.com
    
    Pinging www.google.com [10.1.253.9] with 32 bytes of data:
    Control-C
    ^C
    


  • Damn. Sometimes....

    A "ipconfig /flushdns" did it.


Log in to reply