I'm in a WLAN which is censoring web sites by their DNS server.As I want not to be censored I use a VPN (OpenVPN, NetworkManager) for all of my traffic.If I try to resolve a domain, NetworkManager's dnsmasq asks both their DNS server and mine (VPN). Now the censorship depends on which DNS server responds first.How do I get rid of that? (IMO) There is (also technically) no need to ask their DNS server as the VPN is on top of the WLAN.[Edit] As requested:NetworkManager uses dnsmasq.pgrep dnsmasq -a2766 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/NetworkManager/dnsmasq.pid --listen-address=127.0.1.1 --cache-size=0 --conf-file=/dev/null --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.dcat /etc/resolv.confnameserver 127.0.1.1I don't use dhclient at all.
NetworkManager should ask only the top DNS server
dns;openvpn;networkmanager;vpn;dnsmasq
If you don't want the DNS Server from the lan, configure ipv4.no-auto-dns on that WLan. You don't need a VPN to avoid the limited DNS server, just configure a static address like 'ipv4.dns=8.8.8.8'.Recent versions also have ipv4.dns-priority. if you set the priority of your VPN to a negative number, no DNS servers from your other connections are added. The VPN nameservers are then used exclusivly.See man nm-settings