On Thu, Apr 18, 2024 at 10:07:04PM -0400, Christopher Hill wrote: > Hi, > > I have a question regarding if upstream DNS forwarding can be based on the > source interface? Reading the manual I don't believe it is possible..? > > The scenario I have is two VLANs that can talk to each other and both use > dnsmasqfor local name resolution - this works fine. Each VLAN is configured > at the gateway to default route traffic to different VPNs, e.g. VLAN1 out to > VPN1, and VLAN2 to VPN2 respectively, and I would like dnsmasq to forward > requests originating on VLAN1 to the DNS on VPN1, and the same for VLAN2 > forwarding to VPN2. > > To illustrate: > > tun1 VPN1 VPN2 tun2 > 10.0.1.1 | | 10.0.2.1 > +---+---+ > | > WAN > | > +-------+--------+ > | eth0 | > VLAN 1 <-+-eth1 eth2-+-> VLAN 2 > 192.168.1.0/24 | (gateway) | 192.168.2.0/24 > +----------------+ > > > I would like to do something like the following in the dnsmasq configuration > on the gateway: > > server=eth1,10.0.1.1@tun1 > server=eth2,10.0.2.1@tun2 > > i.e. queries arriving on eth1 get sent to 10.0.1.1 via tun1, and queries > arriving on eth2 get sent to 10.0.2.1 via tun 2. > > I have considered running two instances (one bound to eth1 and another > to eth2) but that duplicates setup and makes local queries across VLANs more > complicated.
Read the dnsmasq manual and reread the dnsmasq manual. Groeten Geert Stappers -- Silence is hard to parse _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss