G
G
Grigory Shchetintsev2020-11-17 00:30:54
linux
Grigory Shchetintsev, 2020-11-17 00:30:54

How to specify different DNS forwards for different address pools for DNSMASQ?

INTRODUCTION I plan to move from BIND9
to DNSMASQ, so the question arose of transferring the config.

INITIAL DATA
I have two gateways on the same network with their own DHCP and DNS (don't ask, these are the conditions of the problem!).
These gateways handle two different pools on the same subnet.
192.168.88.1 handles the pool 192.168.88.2-192.168.88.29
192.168.88.30 handles the pool 192.168.88.31-192.168.88.59

Accordingly, each is a DNS server for its pool.

BIND9 easily copes with this task by working at the address 192.168.88.7
Accordingly, the gateways distribute their own set of DNS for each pool via DHCP, but the first is always 192.168.88.7

All this is necessary for the operation of local domain names, they also work from the Internet.

Example from BIND9:

acl "loc" {
        127.0.0.1;
};

acl "lan-pool-one" {
        192.168.88.1;
        192.168.88.2;
        192.168.88.3;
        192.168.88.4;
        192.168.88.5;
        192.168.88.6;
        ...
};

acl "lan-pool-two" {
        192.168.88.30;
        192.168.88.31;
        192.168.88.32;
        192.168.88.33;
        ...
};

acl "ext" {
        !192.168.88.0/24;
        any;
};


QUESTION
What settings do I need to apply in DNSMASQ to specify my DNS gateway for different pools of local addresses? Ideally, exactly repeat the work of BIND9!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question