On Mon, 14 Apr 2025, Nitesh Divecha via Dnsmasq-discuss wrote:

Is it possible for dnsmasq to honor policy routing (e.g., via ip rule) for outbound DNS queries, or to bind its source IP explicitly so Linux routing decisions follow the correct table?

This sounds like more of a sysadmin issue than a dnsmasq issue.

According to the manpage for ip rule, a rule with iif lo will match all locally generated traffic. Try that (ip rule add iif lo table natlan).


ip rule add - insert a new rule

    iif NAME

        select the incoming device to match. If the interface is
        loopback, the rule only matches packets originating from this
        host. This means that you may create separate routing tables
        for forwarded and local packets and, hence, completely separate
        them.

--
Peter Tirsek

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to