With the (abbreviated) ifconfig below, I sometimes temporarily change the default route to use tun1 instead of enp2s0 - using the ip route command.
But I assume that systemd-resolved continues forwarding its unresolved queries via the 192.168.8. network on enp2s0, which it got via DHCP when the network was started.
What's the correct way to temporarily make systemd-resolved forward to another resolver - say 8.8.8.8? Or even to the resolver at the end of tun1 at 10.7.2.5?
(Ubuntu 20.04 focal, systemd 245 (245.4-4ubuntu3.2)
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.8.15 netmask 255.255.255.0 broadcast 192.168.8.255 inet6 fe80::12a5:d04e:6dfe:c664 prefixlen 64 scopeid 0x20<link> ether 6c:fd:b9:dc:fe:c6 txqueuelen 1000 (Ethernet) RX packets 2196765 bytes 1237416267 (1.2 GB) RX errors 0 dropped 14 overruns 0 frame 0 TX packets 2727617 bytes 1367321135 (1.3 GB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0tun1: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 inet 10.7.2.6 netmask 255.255.255.255 destination 10.7.2.5 inet6 fe80::bf91:4d41:6e56:9a46 prefixlen 64 scopeid 0x20<link> unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100