https://github.com/savetz/mullvad_allow_ssh
ssh into your remote linux server while running mullvad VPN
https://github.com/savetz/mullvad_allow_ssh
iproute mullvad nftables ssh ssh-tunnel vpn
Last synced: 2 months ago
JSON representation
ssh into your remote linux server while running mullvad VPN
- Host: GitHub
- URL: https://github.com/savetz/mullvad_allow_ssh
- Owner: savetz
- License: cc0-1.0
- Created: 2025-02-25T21:51:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-25T22:01:08.000Z (over 1 year ago)
- Last Synced: 2025-12-27T20:46:39.408Z (6 months ago)
- Topics: iproute, mullvad, nftables, ssh, ssh-tunnel, vpn
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.