DNSMasq Wildcard Round-Robin DNS

0

Hello can you guys help me too.

I'm trying to achieve something here but I'm not sure if what I'm trying to do is even possible with DNSMasq or not so I need you guys help.

I need to assign multiple static IP addresses to Wildcard domains for example:

*.google.com should point to:
x.x.x.x
x.x.x.x
x.x.x.x

Example 2:

example.google.com should point to same addreses as above:
x.x.x.x
x.x.x.x
x.x.x.x

and so on....

I can achieve that by using hosts file for fixed domain like Google.com but not with Wildcard entries for it and if I use:

address=/google.com/x.x.x.x

that works with Wildcard domains but with only single IP.

So is there any way to combine them both together?

I really hope I made myself clear....... :/

P.S I'm trying to do that on my routers DNSMASQ which is riding ASUS WRT-Merlin

Asad

Posted 2018-02-04T10:51:30.340

Reputation: 1

Probably can't be done - see https://serverfault.com/questions/518702/multiple-ips-for-wildcard-domains-using-dnsmasqs-config-format

– davidgo – 2018-02-04T19:05:49.830

I've read that post earlier but it was from 2014 and apparently the new DNSMasq version does support it in some way but I'm not yet able to do that. See here: https://serverfault.com/questions/853282/is-it-possible-to-add-a-wildcard-cname-into-dnsmasq/853996#853996

– Asad – 2018-02-04T19:08:38.873

Why can't you do that? What version of DNSMasq are you running ? I'd imagine that very new versions of Merlin will support the new version of DNSMasq because of security holes patched in an older version a few months back. – davidgo – 2018-02-04T19:11:35.980

@davidgo I'm on the latest version of Merlin and it's running DNSMasq 2.77. I'm able to add the first line (cname=*.Google.com, default.google.com ) and tested it that part worked and I can get dig results if I do it for *.Google.com but it's not working for wildcards. And when I add the remaining lines it breaks the internet :/ – Asad – 2018-02-04T19:20:31.247

When I add the last three lines ( separately or combined ) I get unsupported option error in the router log and DNSMasq failed to startup. – Asad – 2018-02-04T19:50:56.837

What about trying dd-wrt-kong - 2.77 is old (and insecure). I know on my Asus Rt-1900ac routers to Kong it came with a newer version - I wonder if Kong is rebuilding from source? ( No guarantee this will fix your issue though) – davidgo – 2018-02-04T19:52:48.353

DD-WRT is not an option for me because I don't want to leave the Asuswrt firmware. Can you tell me how can I check the DNSMASQ version? I just guess that it should be 2.77 because I read about it somewhere ( didn't remember now ) – Asad – 2018-02-04T19:55:17.470

Ok according to official Merlin change log it's running DNSMasq 2.78 – Asad – 2018-02-04T20:01:54.917

Apparently Merlin DNSMasq doesn't support authoritative DNS so that's an issue :/ – Asad – 2018-02-04T20:38:06.453

No answers