Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mullvad/mullvadvpn-app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Themullvad dns command manages DNS configuration including Mullvad’s default DNS with content blocking or custom DNS servers.
Syntax
Subcommands
get
Display current DNS settings:set
Configure DNS servers:Set Modes
default
Use Mullvad’s default DNS servers with optional content blocking:--block-ads- Block domains known for advertising--block-trackers- Block domains known for tracking--block-malware- Block domains known for malware--block-adult-content- Block domains with adult content--block-gambling- Block domains known for gambling--block-social-media- Block social media domains
custom
Use custom DNS servers:<SERVER>...- One or more IP addresses of DNS resolvers
Examples
View Current DNS Settings
Use Default DNS
Default DNS without blocking:Enable Content Blocking
Block ads and trackers:Use Custom DNS Servers
Single DNS server:Content Blocking Categories
Ads
Blocks domains commonly used for advertising and sponsored content. Example blocked domains:- Ad networks
- Ad servers
- Sponsored content providers
Trackers
Blocks domains used for user tracking and analytics. Example blocked domains:- Analytics platforms
- Tracking pixels
- Fingerprinting services
Malware
Blocks domains known to distribute malware or participate in malicious activities. Example blocked domains:- Malware distribution sites
- Phishing domains
- Command and control servers
Adult Content
Blocks domains hosting adult/NSFW content.Gambling
Blocks online gambling and betting sites.Social Media
Blocks popular social media platforms. Example blocked domains:- Twitter/X
- TikTok
DNS Modes
There are two DNS modes:- Default - Uses Mullvad’s DNS servers with optional content blocking
- Custom - Uses your specified DNS servers (no content blocking available)
Related Commands
- tunnel - Configure other tunnel options
- connect - Connect with current DNS settings
- status - View connection status
Exit Status
| Code | Description |
|---|---|
| 0 | DNS settings updated successfully |
| 1 | Invalid DNS server or configuration failed |
Notes
- DNS changes take effect on the next connection (reconnect if already connected)
- Custom DNS servers must be valid IP addresses
- Content blocking only works with Mullvad’s default DNS
- Both IPv4 and IPv6 DNS servers are supported
- Multiple DNS servers provide redundancy
- Content blocking is implemented at the DNS level (domain blocking)
Source Reference
Implementation:mullvad-cli/src/cmds/dns.rs