This may seem like an odd question, but I'm in a corporate network and VPNing in to Amazon's AWS, both of which use the same block of 10.0.0.0 addresses. Ultimately, there is no overlapping, but I can't set up static route tables to divide the two networks. I have dnsmasq configured to properly route DNS queries either to the Amazon DNS server or the internal DNS server, but I'd like the responses to be dumped as routes so that subsequent requests are served correctly. Any ideas on how to go about this?
EDIT: Let's say I have 2 adapters, TUN1 and ETH1. I also have two domains DOMAINA.COM and DOMAINB.COM. All request to *.DOMAINA.COM should be served through TUN1 and all requests to *.DOMAINB.COM should be served through ETH1. Both DOMAINA.COM and DOMAINB.COM addresses sit in the 10.0.0.0/24 block, but...
If I request SERVERA.DOMAINA.COM and it returns 10.1.1.5, I should also route 10.1.1.5 through TUN1. If I request SERVERB.DOMAINB.COM and it returns 10.1.1.6, 10.1.1.6 should route through ETH1.
If your example is accurate, and there's a 10.1.1.0/24 block on both sides, then you do have overlap. Routing uses numbers, not names, and that's a good thing for the internet.
Solution A (preferred): Fix the overlap.
Solution B: Put a NAT in place for the remote network, so that local devices see the remote devices as being in 10.1.2.0/24.
Solution C: Combine the broadcast domains with a layer 2 tunnel of some sort.
Solution D: Lots and lots of static /32 or slightly larger routes.