-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: keeping system DNS unchanged or use custom DNS #473
Comments
We have plans on adding a feature to make the app set a custom DNS resolver. But I'm unsure we want to disable its DNS setting/monitoring completely. The app is fully responsible for the system security and our job is to try to protect the privacy of the people using it. Leaking DNS is terrible for privacy, so it's not something we want to make it too easy for users to do. |
being able to set a custom DNS would fix my problem either way |
Hi, I'm using a Raspberry Pi with Pi-Hole as a DNS server to filter out ad-related lookups. I have my router configured to set the IP of the RPi as DNS on my network over DHCP, but when starting the Mullvad client, the DNS is changed to e.g. 10.11.0.1. An option to configure the DNS manually would be very much appreciated! Side note/question: Is using the Mullvad DNS at 193.138.219.228 as safe as using the one available on each VPN server (e.g. 10.11.0.1)? |
@akej74 Yes, the public DNS on that IP is still supported. As explained in our DNS leak guide (under Other users) all requests to it will actually be hijacked and redirected to the DNS resolver running on each VPN server when you are connected to Mullvad. So in practice, using |
Hi, just a quick question on the topic of adding a custom DNS setting in the Mullvad app, is this something that is on the roadmap? If not, I need to rely on the OpenVPN app, but I would prefer the Mullvad app. |
It is on the roadmap. But I don't have a time frame for it currently. It's not part of what we are working on at the moment. |
I've just spent 5 minutes or so trying to figure out why I couldn't reach any websites. Of course, I eventually checked the I'm alright with Mullvad changing it, but there needs to be some kind of notice to users that if the VPN is unexpectedly killed, the |
If you mean that EDIT: @c-edw If you believe what you are experiencing to be a bug, then please file an issue on that. This issue is about something else, so let's keep them separate. |
My laptop battery died while I was connected. I guess it could be considered a bug - it depends on whether the client is supposed to restore the DNS settings in this case. |
@c-edw It should indeed have restored the DNS automatically on reboot. We have four different ways of managing DNS depending on what services are available on your distro etc. If you can reproduce the problem it would be awesome if you could send a problem report to our support through the app. |
+1 for me. I would very much like the ability to set the DNS on the VPN adapter to Mullvad but please make it optional to change all DNS server addresses on all network cards. |
+1 Really needed feature for pi-hole users. |
You can work around this by installing OpenVPN and creating connection files through Mullvad. |
+1 |
This is how I set up my OpenVPN client configuration to use a custom, local DNS server (Pi-hole):
|
Anyone knows if the same works for OpenVPN Connect on iOS? Where Download the |
+1, would love if this is also possible in Wireguard and not only OpenVPN |
+1, this feature would be killer for PiHole users! |
+2 if Mullvad could provide ads blocking DNS on their side insead of relying on Pi-Hole |
Would be great if it supported DNS-over-TLS, but I guess it must be implemented on Wireguard first. |
I've just figure out how to use DNS-over-TLS on a Wireguard connection: (It may not apply to Mullvad apps, only official Wireguard software for GNU/Linux and Android) On GNU/Linux system you must install and setup unbound or stubby software with the DNS-over-TLS service of your choice (e.g NextDNS.io), then set your /etc/resolv.conf to 127.0.0.1 and remove the DNS option from your Wireguard configuration (or just set it to On Android 9 or later, use the Wireguard official app to connect to Mullvad. Set the the DNS option of the desired VPN configuration to blank. It will make it use Android system's DNS. Go to Settings > Network > Advanced > Private DNS and set it to the DNS-over-TLS service of your choice. I would suggest Mullvad developers to provide an option to "Use system DNS" on their apps. Thanks |
Having the client prepend a Correct me if I'm worong but adding localhost as a DNS sever usually should not leak any DNS to the outside world. |
Option to personalize DNS resolver is definitely something missing in Mullvad VPN, particularly if you you want to use DNS including ADBlocking. |
+1 for this option in order to allow pi-hole or other custom ad blocker. thanks for the hard work mullvad team |
If you're using wireguard, shouldn't it be as easy as setting |
@faern what about querying the first and if it doesn't find the domain or it fails than fallback on the secondary (if set) and in case if is not set use the default one from Mullvad? |
Support said I am required to use the Windows DNS Caching service, which I don't want, else I need to use OpenVPN |
what about the "leave my dns unchanged" option ? my /etc/resolv.conf has immutable flag as purpose and i don't want any application to touch it, having to remove that to set again 127.0.0.1 as custom dns is not enough for me. |
Is there a way to use systemd-resolved stub listener on |
🎉 Yesterday we released app version https://mullvad.net/en/blog/2021/2/11/long-awaited-feature-introduced-desktop-app-20211/ This means that you can now go to Settings -> Advanced and set up custom DNS resolver IPs. However, since our VPN servers still hijack all DNS requests going through them only local resolvers are possible. This means you can use The same functionality will come for Android in the next release. We have no ETA for when that is. But expect it in a few weeks maybe. That means most of the functionality in this feature request has now been implemented. I hope it will work well for all of you! |
Slightly off-topic, but also somewhat related: Might there be any problems when using Mullvad’s DNS server (IP via: https://mullvad.net/en/help/dns-leaks/) as the upstream DNS of my raspberry pi (with pihole) to prevent DNS leaks? Are there more/alternate Mullvad DNS server IPs in case of downtime or lots of traffic? |
If you just use our public DNS server as your DNS resolver and don't have a VPN tunnel or anything, then your ISP or anyone else between you and our server will see your requests. Normal DNS is not encrypted. And if you do have a VPN tunnel on the other hand it's a different deal. We have also just now released our own DoH and DoT solutions (still in beta). You can try that out if you are interested: https://mullvad.net/en/help/dns-over-https-and-dns-over-tls/ For other inquiries about DNS and usage of our infrastructure please contact [email protected] instead as this is not app related. |
I have lost hours pissing about with DNS today - when my server is connected to Mullvad all DNS lookups fail. I cant run incoming connections to my public IP either when mullvad is running, all attempts at setting up port forwarding on my account page fail whether using wireguard or openvn - this all works when mullvad is disconnected! Not only that but often a 'mullvad status' request says 'connection blocked... too many clients' which is bananas, and searching for help on the web is fruitless - it finally brought me here to find out that I cant use my local DNS I have set up already, and the new custom-dns settings in the linux client do not work. I've cancelled my recurring payment and will look for something else. Its a shame, I've been happy for years with mullvad but havent tried anything 'outside of the box' until now. |
@TheOriginalCoda You can set a custom DNS is the app. I'm not sure what part of it / why it does not work for you. However, if the local resolver is on As for incoming connections. Yes, our app blocks that as by design. When enabled nothing outside the tunnel is allowed. However, you can manually add firewall rules with higher priority than the rules our app add, and then allow whatever it is you want to allow there. See this comment for some inspiration: #2097 (comment) |
Can you please make this not require dnscache Windows service? |
I'm not part of Mullvad, but wanted to add my .2c: At some point with Windows 10 the dnscache Windows service became a required service. This is very poorly documented. The dependance on dnscache goes so far that even Powershell commands require it to be running and just silently fail if it's not. My .2c as a developer from another project: It just does not make sense anymore to turn off dnscache. I feel that at this point, turning it off can be seen as a modified operating system. |
I personally dislike dnscache as I run my own DSN server, and during a troubleshooting or whitelisting issue, I have to disable the dnscache so I am getting proper nslookups, unhindered by the cache |
In that case I would recommend to leave dnscache enabled and use the amazing tool Just be careful when using it while having Mullvad enabled, as - afaik - they catch astray dns queries and redirect them to themselves. |
Thanks, good idea.! |
We have stopped hijacking astray DNS requests if you use our app and have a WireGuard tunnel. Any WireGuard key uploaded by the app in the last few weeks has DNS hijacking disabled. This is to allow our custom DNS feature to work as expected. But it also means you can query whichever DNS server you want in the tunnel via dig :) |
@faern any plans to allow localhost with custom port on android as custom DNS? I didn't want to open a new issue yet, because I feel this is related. It would be great to be able to use Nebulo (in non-vpn mode) to be able to filter network activity with block lists and afterwards route it to DOH. Allowing blocklists within mullvad would also do, but not sure if that is on the table. |
@ph00lt0 I can add to our research to check if we can support custom ports on Android easily or not. But this is nothing we currently have in our backlog or a timeline for. I'm not sure exactly what it is that you want to block. But just so you know: We support ad and tracker blocking via DNS on all our relays already. You can use it on Android by setting a custom DNS. Read this blog post for the details: https://mullvad.net/en/blog/2021/5/27/how-set-ad-blocking-our-app/ |
@faern thank you. I am aware that you offer ad- and tracker blocking already, but I would like to be in control over what I block, mainly to block more things, that might break some functionalities which I do not need and known malware lists. |
Very similar issue: #3173 |
@faern am I doing something wrong? |
You'll have to enable |
Is there a way to use default system dns for local domains (like I found that I can sort of make it work with dnsmasq config
and setting custom dns server in the app to If I add
So apparently default firewall rules block even mullvad's own dns. I tried to set custom dns to nft rule
This allows I think this happens because chain output
Which is weird - shouldn't it just accept everything that goes out to Any ideas? I want to use the app because it's convenient and has |
You can setup exclusion rules for your local resolver address and apply said rules on boot. All you have to do match your DNS traffic and assign an exclusion mark. There's a handy guide for this on our website. If you exclude your local DNS traffic, |
Yes, I've seen this guide, even linked it myself in the original comment. Anyway, I've managed to solve this. So, the problem:
So any dns traffic not going to the custom dns is blocked.
But it is surprisingly hard to bypass the dns filter for traffic that will go inside the tunnel (like Seeing Ct mark here is not enough, only inserting What I did:
That way
Warning: obsolite and sometimes(?) dns leaks
5 Jul 2022: I checked it in on https://mullvad.net/en/check, dns didn't leak before, but now apparently it does. Wtf? Anyway, see below: Kind of clunky, would prefer if all of the dns traffic going through the tunnel would be just UPD 5 Jul 2022I found out how to achieve the above with systemd-resolve exclusively. Inspired by this. Here it is:
My local domain is
/etc/systemd/network/20-wired.network
/etc/systemd/resolved.conf
(Note that while I don't see dns leaks, it doesn't explicitly block everything non Results
|
this might help resolve issues using mullavad with portmaster which also enforces a DNS |
This solved my Problem: https://schnerring.net/blog/use-custom-dns-servers-with-mullvad-and-any-wireguard-client/ With the API call above I got a "non DNS hijacking IP" and could finally use unbound + Mullvad Wireguard on my router. |
Author of that blog post here 👋 I'm currently seeing DNS timeouts when using Mullvad servers provided by
Regarding (2): has the API endpoint to request non-DNS-hijacked IPs changed away from |
@schnerring We do not use that endpoint anymore. You should probably disable DNS hijacking when creating a device, not when rotating the key owned by that device. Untested, but this should work:
|
hi, I have a local DNS resolver for caching reasons and I want to keep using it when I enable mullvad, but the daemon changes
resolv.conf
without asking and even monitors it and reverts it every time it is changed. I couldn't find a way to disable thiscould an option be added to disable this behaviour?
The text was updated successfully, but these errors were encountered: