Skip to content

savetz/mullvad_allow_ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

mullvad_allow_ssh

ssh into your remote linux server while running mullvad VPN

The problem: I had an ssh connection open to my remote linux server. I activated the mullvad VPN with mullvad connect — and, naturally, my ssh connection dropped.

The solution: this script, which builds ip route and nft rules to allow ssh traffic from a single specified "Home" IP address.

Usage: ./exclude_home_ip.sh HOME_IP> Example: ./exclude_home_ip.sh 45.46.112.140

  1. Finds your default gateway on eth0.
  2. Adds a /32 route for your HOME_IP
  3. Installs nftables rules to mark and route traffic to/from HOME_IP from Mullvad
  4. Adds a route for your home IP outside the VPN
  5. Installs the excludeTraffic rules

Run this before mullvad connect

Does not persist: run after reboot or if your HOME_IP changes.

About

ssh into your remote linux server while running mullvad VPN

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages