Twingate client doesn't rewrite /etc/resolv.conf correctly on Linux

On both Ubuntu 18.04 and 22.04, when I enable the Twingate client, /etc/resolv.conf doesn’t update properly, and as a result, I end up with name resolution errors.

I’m also currently using Twingate on a Mac OS device, where everything works fine. When I disable Twingate on my macbook, I see:

search home
nameserver 192.168.2.1
nameserver <IP address provided by ISP>

When I enable it, I see:

search home
nameserver 100.95.0.251
nameserver 100.95.0.252
nameserver 100.95.0.253
nameserver 100.95.0.254

On Linux, I get this when I disable Twingate:

nameserver 8.8.8.8
nameserver 4.2.2.1
search .

When I enable it:

nameserver 8.8.8.8
nameserver 4.2.2.1
nameserver 100.95.0.251
# Too many DNS servers configured, the following entries may be ignored.
nameserver 100.95.0.252
nameserver 100.95.0.253
nameserver 100.95.0.254
search .

When I try to access a Twingate resource, the machine consults the first nameserver 8.8.8.8 and fails. I have no control over the ordering of the nameservers, so sometimes the Twingate ones will appear first and everything would work as expected.

I can’t say I’ve ever seen the resolv.conf get that jumbled up before – how frequently would you say it is that Twingate works correctly? Is it every other time, or more often than not, or most of the time it doesn’t?

I know we’re looking at a couple other situations involving the linux client and the way it interacts with the resolv.conf file in some upcoming releases, but I’ll bring this to our team’s attention as well.

It looks like I made a mistake. This issue is only happening on our Ubuntu 22.04 machines where we have systemd version 249 (249.11-0ubuntu3.6) installed. Our older machines running Ubuntu 18.04 and systemd 237 had a different issue unrelated to Twingate, but /etc/resolv.conf (or rather, /run/systemd/resolve/resolv.conf) looks correct there. On the machines where the issue occurs, the file looks like that half the time and the other half the time, the order is switched so the 100.x.x.x IP addresses appear before 8.8.8.8 and 4.2.2.1. I can change the ordering by running sudo systemctl restart systemd-resolved, and sometimes the ordering changes and other times it remains as before. I think it’s completely random 50/50.

Got same problem.
But in my case resolv.conf does not change.
twingate online:
nameserver: 8.8.8.8
nameserver: 1.1.1.1
twingate offline:
nameserver: 8.8.8.8
nameserver: 1.1.1.1

So looks like DNS resources unfortunately are not working for me under the linux (ubutnu 20.04, 22.04).