Skip to main content

Overview

The mullvad tunnel command manages tunnel configuration including MTU, quantum resistance, DAITA, allowed IPs, key rotation, and IPv6 settings.

Syntax

Subcommands

get

Display current tunnel configuration:

set

Configure tunnel options:

Set Options

mtu

Configure tunnel MTU (Maximum Transmission Unit):
Arguments:
  • <VALUE> - MTU value in bytes (e.g., 1380, 1420), or “any” for automatic

quantum-resistant

Configure quantum-resistant key exchange:
Values:
  • auto - Automatically select based on Mullvad recommendations
  • on - Always use quantum-resistant tunnels
  • off - Never use quantum-resistant tunnels

daita

Enable or disable DAITA (Defense against AI-guided Traffic Analysis):

daita-direct-only

Configure whether DAITA should only work on direct connections:

allowed-ips

Specify custom allowed IPs for WireGuard tunnels:
Arguments:
  • <IP_RANGES> - Comma-separated IPs and CIDR ranges, or empty string to reset
Format:
  • Single IPs: 192.168.1.1
  • CIDR ranges: 10.0.0.0/24, fd00::/8
  • Multiple: 10.0.0.0/24,192.168.1.1,fd00::/8
  • Reset: “ (empty string)
WARNING: Incorrect configuration may block internet access or break VPN functionality.

rotation-interval

Set WireGuard key rotation interval:
Arguments:
  • <HOURS> - Number of hours between key rotations, or “any” for default

rotate-key

Immediately rotate the WireGuard key:

ipv6

Enable or disable IPv6 in the tunnel:

Examples

View Current Configuration

Output:

Set MTU

Set specific MTU:
Output:
Set automatic MTU:

Configure Quantum Resistance

Enable quantum resistance:
Output:
Use automatic mode:

Enable DAITA

Output:

Configure Allowed IPs

Route only specific networks:
Output:
Reset to default (all traffic):

Key Rotation

Set rotation interval to 7 days:
Output:
Reset to default interval:
Output:
Rotate key immediately:
Output:

IPv6 Configuration

Enable IPv6:
Output:
Disable IPv6:

WireGuard Key Management

The tunnel command displays information about your current WireGuard key:
  • Public key - Your device’s public WireGuard key
  • Created - When the key was generated
  • Rotation interval - How often the key is automatically rotated
Keys are rotated automatically based on the configured interval, or you can manually rotate them using rotate-key.

Quantum Resistance

Quantum-resistant tunnels use post-quantum cryptography to protect against future quantum computers. The three states are:
  • auto - Uses quantum resistance when Mullvad recommends it
  • on - Always establishes quantum-resistant tunnels
  • off - Uses standard WireGuard without post-quantum cryptography

DAITA (Defense against AI-guided Traffic Analysis)

DAITA provides additional protection against advanced traffic analysis:
  • Adds cover traffic to mask patterns
  • Helps defend against AI-powered traffic analysis
  • May slightly increase bandwidth usage

Allowed IPs

By default, WireGuard routes all traffic (0.0.0.0/0, ::/0) through the tunnel. Custom allowed IPs let you:
  • Route only specific networks through VPN
  • Implement split tunneling at IP level
  • Exclude certain destinations from VPN
Host bits must be zero in CIDR ranges (e.g., 10.0.0.0/24 valid, 10.0.0.1/24 invalid).
  • relay - Configure relay selection
  • connect - Connect with current tunnel settings
  • dns - Configure DNS servers
  • split-tunnel - Configure application split tunneling

Exit Status

Notes

  • MTU affects packet size and can impact performance on some networks
  • Quantum resistance may slightly increase connection overhead
  • Key rotation happens automatically in the background
  • Custom allowed IPs require careful configuration to avoid connectivity issues
  • IPv6 setting affects both tunnel and relay selection

Source Reference

Implementation: mullvad-cli/src/cmds/tunnel.rs