How to refresh DNS lookup?

When we connect to a VPN while using Snap Slack, a new DNS is set up. However, Snap Slack did not automatically update to the new DNS and instead continue to use the old DNS settings. This can lead to lookup errors such as ERR_NAME_NOT_RESOLVED because the old DNS is no longer reachable.

Is there a way I can add to snapcraft.yaml to access an updated DNS, such as accessing /etc/resolv.conf?"

I also tried with adding plugs like - system-observe - process-control - network-observe - mount-observe - shared-memory - network-manager - network-setup-observe - avahi-control - avahi-observe

and they did not work out for me :frowning:

Thanks!

Is this a Slack issue or a snap issue? I don’t think I ever had this issue. @pedronis do you think you see a possibility for the snap confinement to interfere here?

the various network*interfaces all provide access to /run/systemd/resolve/stub-resolv.conf (which nowadays /etc/resolv.conf links to) like:

i wonder if the host machine VPN setup is not properly integrated with systemd-resolved and instead applies a hack to /etc/resolv.conf directly ?

I believe I have figured out that it was caused by a one of the settings from Snapcraft.yaml. Thank you!!