Hello all,
I am trying to find out how to automatically change the search domain for VPN.
When I connect to VPN via network manager (GUI), the resolvectl is configured like this:
Global
Protocols: LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Link 5 (vpn0)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: +DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/nsupported
Current DNS Server: 10.251.3.100
DNS Servers: 10.251.3.100 10.251.3.202
DNS Domain: domainx.com
Unfortunatelly, I need to resolve in this VPN also domain like domainz.com. To fix it, I run:
sudo resolvectl domain vpn0 β~.β
Than all works, but I have to do it each time manualy. Is there any way how to automate it or how to permanently modify the DNS resolution for VPN?
Thanks for help.