I am working at a company where – due to several strange reasons – I have the following setup:
- Ethernet: is in a guest network and has access to the internet
- Wifi: is in a corporate network and has access to the intranet
- the adapter order is set, so that the ethernet is first
route addis used to add the intranet routes I need (10.[4/6/1/39].x.x. etc.)
The problem now is that certain programs don't work, since they do not use IPs but named addresses. Consequently
scutil --dns therefore has resolver #1 with external DNS servers, and then follows resolver #2 with the intranet DNS servers. (if I disconnect the cable and am in the Wifi corp only, the names are resolved just fine).
I thought of two possible solutions, but I don't know how to get them working:
- even though Wifi is the first adapter in order, I somehow switch the DNS resolver order so that intranet DNS is tried before internet DNS
- put the Wifi adapter in first place and then find an "excluding" route command, which does not say "send IP X over en0" but instead "send any IP not equal to X over en1"
Can somebody help me here?