Skip to main content
2 of 2
Add missing parts to arrive at the final solution

You may be able to achieve split DNS (conditional forwarding) with the following configuration (assuming ppp0 is your VPN interface and enp6s0 your regular LAN):

resolvectl dns ppp0 corp.ip.add.ress resolvectl domain ppp0 ~corp.domain.name resolvectl default-route ppp0 false resolvectl default-route enp6s0 true 

This will use the default DNS for all queries except for those that have a domain ending with corp.domain.name. For those queries, it will use corp.ip.add.ress. Also note the default route has to be corrected, as connecting to the VPN might result in updating the default.

bbc
  • 2.1k
  • 1
  • 13
  • 7