On Tue, Mar 24, 2020 at 06:03:47PM +0100, Kamil Jońca wrote: > How can I configure resolved to do something like: > eth - interface > tun1 - interface to vpn1 with domains a, b, c > tun2 - interface to vpn2 with domains d, e > > I want to resolve domains a,b,c with dns server in vpn1 and domains d,e > with server in vpn2. > > Can I do it with resolved?
What you want to do would be best solved by a DNS resolver that you configure to forward requests to various places based on the requested domain. Any of the major DNS server software packages should be able to do it. I don't count systemd-resolved among those. Note that forwarding of requests means that you send the request to a DNS resolver/server by IP address. Not by network interface name. So, it's conceivable that you would set up *multiple* custom DNS resolvers -- one that's visible on the LAN to receive the client requests, and one for each of these tunnel interfaces to have the requests forwarded to them, and then proceed normally. A DNS-focused mailing list might be a next step, if you can't figure it out from my horribly mangled attempt to describe the infrastructure.