Overview
Themullvad lan command controls whether you can access devices on your local network (LAN) while connected to the VPN.
Syntax
Subcommands
get
Display the current local network sharing setting:set
Change the local network access setting:allow- Allow access to local network devicesblock- Block access to local network devices
Behavior
Allow LAN Access
When set toallow:
- ✓ Can access local network devices (printers, NAS, etc.)
- ✓ Local traffic bypasses VPN tunnel
- ✓ Can access router admin interface
- ✓ Network shares and services accessible
- ✓ Local multiplayer gaming works
- Internet traffic still routes through VPN
Block LAN Access
When set toblock:
- All traffic routes through VPN, including local
- Cannot access local network devices
- Maximum isolation from local network
- Better security on untrusted networks
Examples
Check Current Setting
Allow Local Network Access
Block Local Network Access
Use Cases
Home Network Access
Allow LAN access to use home devices:- Network printers
- Network-attached storage (NAS)
- Smart home devices
- Media servers (Plex, Jellyfin)
- Local web services
- Router configuration interface
Public WiFi Security
Block LAN access on untrusted networks:- Coffee shop WiFi
- Hotel networks
- Airport WiFi
- Public hotspots
- Any untrusted network
Maximum Isolation
Block all local network access:- Complete network isolation
- Maximum security
- No local network exposure
Local Network Detection
Mullvad automatically detects local network ranges:Private IP Ranges
10.0.0.0/8- Class A private network172.16.0.0/12- Class B private network192.168.0.0/16- Class C private network169.254.0.0/16- Link-local addressesfc00::/7- IPv6 unique local addressesfe80::/10- IPv6 link-local addresses
What Counts as Local
Local network traffic includes:- Same subnet communication
- Router/gateway access
- Broadcast traffic
- Multicast traffic
- mDNS/Bonjour discovery
Common Local Services
Network Printers
Access network printers:192.168.1.100.
Network Storage (NAS)
Access NAS devices:Router Admin Interface
Access router configuration:http://192.168.1.1 (or your router’s IP).
Smart Home Devices
Control smart home devices:- Smart lights (Philips Hue, etc.)
- Smart thermostats
- Security cameras
- Home automation hubs
Local Web Development
Access development servers:localhost(always works)- Local machine:
192.168.1.X - Other development machines on LAN
Security Considerations
When to Allow LAN
✓ Safe to allow on:- Home network
- Trusted work network
- Private networks you control
- When you need local device access
When to Block LAN
✓ Should block on:- Public WiFi
- Hotel networks
- Airport WiFi
- Coffee shops
- Any untrusted network
- When maximum isolation is needed
Security Trade-offs
Allow LAN:- Pros: Access to local devices, convenience
- Cons: Exposed to local network threats
- Pros: Maximum isolation, better security
- Cons: Can’t access local devices
Interaction with Other Settings
Lockdown Mode
LAN setting works independently of lockdown mode:- When disconnected: All traffic blocked (lockdown)
- When connected: Internet through VPN, LAN accessible
Split Tunneling
LAN setting is separate from split tunneling:- LAN setting: Controls local network access
- Split tunneling: Controls which apps use VPN
Dynamic Configuration
You can change the setting while connected:Related Commands
- connect - Connect to VPN
- lockdown - Configure traffic blocking when disconnected
- split-tunnel - Configure app-level split tunneling
- status - Check connection status
Exit Status
| Code | Description |
|---|---|
| 0 | Setting updated successfully |
| 1 | Failed to update setting |
Notes
- LAN setting is persistent across restarts
- Changes take effect immediately (no reconnection needed)
- Setting is stored in Mullvad daemon configuration
- Works on all platforms (Linux, macOS, Windows)
- Only affects private IP ranges
- Internet traffic always routes through VPN when connected
Troubleshooting
Can’t Access Local Devices
If you can’t access local network devices:-
Check LAN setting:
-
Allow LAN access:
-
Verify you’re on the same network:
- Check device IP is in private range
Localhost Still Works
Loopback traffic (127.0.0.1, ::1) always works regardless of LAN setting:
localhostis always accessible- Local development servers on
127.0.0.1work - Docker containers on host network work
Recommended Configurations
Home Network
Public WiFi
Balanced Security
Source Reference
Implementation:mullvad-cli/src/cmds/lan.rs