I have the following geo based setup that gives back back a specific address back based on the client IP address.
For this I use powerdns with the geo plugin as the authoritive DNS and Unbound 1.13.1-1ubuntu5.14 as the DNS resolver.
In the test I use three clients located in the networks 192.168.21.0/24, 192.168.22.0/24 & 192.168.23.0/24.
In the test the client should get the right IP back based on the subnet.
The geo zone has the following setup:
When the client ask for z0.geo.example.com the client should get the answer:
client: 192.168.21.0/24 anwser: 192.168.20.2
client: 192.168.22.0 anwser: cname: client2.example.com.
client: 192.168.23.0/24 anwser: 192.168.20.1
When the clients 192.168.21.0/24 & 192.168.23.0/24 do the query at the same time both network do get the right address.
user@cl3:~$ host -vta z0.geo.example.com 192.168.20.183
Trying "z0.geo.example.com"
Using domain server:
Name: 192.168.20.183
Address: 192.168.20.183#53
Aliases:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5105
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;z0.geo.example.com. IN A
;; ANSWER SECTION:
z0.geo.example.com. 10 IN A 192.168.20.1
Received 53 bytes from 192.168.20.183#53 in 18 ms
At the moment a client from 192.168.22.0/24 does the question all the answers returns the CNAME back.
I would expect that only the clients from 22 get the CNAME returned.
This is a known bug in this version?