[Dnsmasq-discuss] How to specify abc.com and *.abc.com to different address

Chen Wei weichen302 at icloud.com
Sun Feb 15 11:39:17 GMT 2015


On Sun, Feb 15, 2015 at 06:48:15PM +0800, zhiwei wrote:
> I don't know how to set 'abc.com to 1.1.1.1'
> and '*.abc.com to 1.1.1.2'.
> (set address=/abc.com/1.1.1.1 and address=/.abc.com/1.1.1.2 in
> configure file did not work)

/abc.com/ is equal to /.abc.com/, at least it applies to --server,
--address, --local, and --rebind-domain-ok configurations.

You have to specify the "*" part of /*.abc.com/ one by one, as
address=/x.abc.com/=1.1.1.2
address=/y.abc.com/=1.1.1.2
address=/z.abc.com/=1.1.1.2

the longest match will win.


-- 
Chen Wei



More information about the Dnsmasq-discuss mailing list