abh / geodns

DNS server with per-client targeted responses
Apache License 2.0
1.37k stars 191 forks source link

Match by IP Prefix/24 or /32 #127

Open praveenkumar2608 opened 3 years ago

praveenkumar2608 commented 3 years ago

Hi Team

I am unsuccessful in getting domain resolved by matching IP address or IP prefix. I think it is supported. Could you please give me some example config for the same.

praveenkumar2608 commented 3 years ago

@abh

abh commented 3 years ago

Yeah, that really should be documented!

For a /32, use "[98.248.0.1]” (no quotes, but square brackets).

and for a /24 use "[98.248.0.0]” — basically if the last octet is a 0 then the code will match the whole /24.

Other CIDR masks aren’t supported.

The same for IPv6; except the /24 equivalent is a /48.

praveenkumar2608 commented 3 years ago

@abh Thank you very much, it works. I would love to see DNSSEC support. Any forecast on this feature.