9 MIN READ

Part of Jumper · jumper · openwrt · wireguard · proxmox

Jumper: how I built a home gateway that sends a phone out through another country (with a kill switch)

Step by step for the OpenWrt VM on Proxmox that sends an isolated network through a WireGuard tunnel to a US VPS, with a real kill switch and USB Wi-Fi.

I wanted a phone in my house to always browse through a VPS in the US, with no VPN app on it and no chance of leaking through my home connection if the VPN dropped. The answer was Jumper: an OpenWrt VM on my Proxmox host, sitting between two network cards, that pushes all the traffic of an isolated network into a WireGuard tunnel.

This post is the step by step, including the things that tripped me up along the way.


What Jumper does

  • Every device on Jumper's network (cable or Wi-Fi) reaches the internet with the VPS's IP.
  • The ISP only sees encrypted traffic going to the VPS: no sites, no DNS.
  • Kill switch: if the tunnel drops, the device has no internet, instead of falling back to the home connection.
  • IPv6 is turned off on Jumper's network, so there is no path around the tunnel.
  • The device needs no configuration at all: just connect.

Topology

phone ──Wi-Fi / cable──┐
                       ▼
        ┌──────── OpenWrt VM (jumper-gw) ────────┐
        │ lan  192.168.77.1/24  (vmbr1, isolated)│
        │        │ firewall: lan → wg, and only  │
        │      wg0 10.66.66.2  (WireGuard)       │
        │ wan  DHCP from the home network (vmbr0)│
        └────────┼───────────────────────────────┘
                 ▼
     home router → internet → VPS (10.66.66.1:51820) → internet
  • vmbr0: the home network (already existed, untouched).
  • vmbr1: a new bridge on a second physical card, with no IP on the host.
  • OpenWrt VM: net0 → vmbr1 (lan/eth0), net1 → vmbr0 (wan/eth1).

What you need

  • A Proxmox server with two network cards (mine: onboard Intel + a Realtek PCIe card).
  • A VPS with a WireGuard server ready (in my case: 10.66.66.1/24, port 51820) and a peer created for Jumper. You will need:
    • the client's private key, the PSK, the server's public key, the VPS IP and port.
  • Optional: a USB Wi-Fi adapter that supports AP mode (I used an RTL8822BU, 0bda:b812).

Golden rule: keep the keys in a .env file, copy it over with scp and delete it afterwards. Never paste keys into a chat, a screenshot or an issue. (I did, by accident... so write it down: after that, the right move is to rotate the keys.)


Step 0: recon

Before touching anything, understand the host:

pveversion
ip -br link
cat /etc/network/interfaces
pvesm status
pvesh get /cluster/nextid

Confirm which card is already on vmbr0. The second card (mine was nic1) must not be on any bridge.

Step 1: create vmbr1 (no IP on the host)

Back up first:

cp -a /etc/network/interfaces /etc/network/interfaces.bak-$(date +%Y%m%d-%H%M%S)

Add to /etc/network/interfaces:

auto vmbr1
iface vmbr1 inet manual
        bridge-ports nic1
        bridge-stp off
        bridge-fd 0
        post-up echo 1 > /proc/sys/net/ipv6/conf/vmbr1/disable_ipv6
        post-up echo 1 > /proc/sys/net/ipv6/conf/nic1/disable_ipv6

The disable_ipv6 keeps the host from getting an fe80:: address on the phone's network. Without it, the host would be reachable on 8006/22 over link-local.

Apply and check:

ifreload -a
ip -br a show vmbr1   # no address at all
ip -br a show nic1    # no address at all
ip -br a show vmbr0   # still has its usual IP

The bridge-fd: value out of range "0" warning from ifup -s is normal on Proxmox; vmbr0 produces it too.

Step 2: create the OpenWrt VM

Download the stable image and check the sha256:

V=24.10.8
B=https://downloads.openwrt.org/releases/$V/targets/x86/64
F=openwrt-$V-x86-64-generic-ext4-combined.img.gz
curl -fsSO $B/sha256sums && curl -fsSO $B/$F
grep " \*$F\$" sha256sums | sha256sum -c -
gunzip -k -c $F > ${F%.gz}   # "trailing garbage ignored" is normal

Create the VM:

qm create 105 --name jumper-gw --memory 256 --cores 1 --ostype l26 \
  --net0 virtio,bridge=vmbr1 --net1 virtio,bridge=vmbr0 \
  --scsihw virtio-scsi-pci --serial0 socket --onboot 1
qm set 105 --scsi0 local-lvm:0,import-from=$PWD/${F%.gz}
qm set 105 --boot order=scsi0
qm start 105

256 MB of RAM and 1 core is plenty: OpenWrt uses about 50 MB.

Step 3: first access (through the serial console)

Get in with qm terminal 105 (leave with Ctrl+O).

Gotcha #1: subnet clash

OpenWrt's default lan is 192.168.1.1/24. If your home network is also 192.168.1.0/24, the router answers on the wrong interface and you cannot reach the wan. Change the lan before anything else:

uci set network.lan.ipaddr='192.168.77.1'
uci commit network
/etc/init.d/network restart

Key-only access

echo 'ssh-ed25519 AAAA... your-key' >> /etc/dropbear/authorized_keys
chmod 600 /etc/dropbear/authorized_keys
uci set dropbear.@dropbear[0].PasswordAuth='off'
uci set dropbear.@dropbear[0].RootPasswordAuth='off'
uci commit dropbear && /etc/init.d/dropbear restart

Allow administration from the wan only from known IPs:

uci set firewall.wan_admin=rule
uci set firewall.wan_admin.name='Allow-Admin-WAN'
uci set firewall.wan_admin.src='wan'
uci set firewall.wan_admin.proto='tcp'
uci set firewall.wan_admin.dest_port='22 80'
uci add_list firewall.wan_admin.src_ip='<HOST_IP>'
uci add_list firewall.wan_admin.src_ip='<YOUR_PC_IP>'
uci set firewall.wan_admin.target='ACCEPT'
uci commit firewall && /etc/init.d/firewall restart

Until you set the root password, LuCI has no password for anyone on the lan. Set it with passwd before connecting any device.

Step 4: WireGuard + kill switch

Install the packages:

opkg update
opkg install wireguard-tools kmod-wireguard luci-proto-wireguard

Send the secrets file to the router (from Windows: scp -O, because OpenWrt has no sftp):

scp -O jumper.env root@<ROUTER_WAN_IP>:/tmp/jumper.env

jumper.env looks like this:

WG_PRIVKEY='...'
WG_PSK='...'
SRV_PUBKEY='...'
SRV_ENDPOINT='<VPS_IP>'
SRV_PORT='51820'

Gotcha #2: Windows CRLF

If the file was created on Windows, the keys end with a \r and WireGuard fails with no clear error. Before using it:

sed -i 's/\r$//' /tmp/jumper.env

Another Windows detail: Notepad saves it as jumper.env.txt and Explorer hides the extension. If scp says "No such file", that is why.

The setup script

#!/bin/sh
set -e
ENV=/tmp/jumper.env
trap 'rm -f "$ENV"' EXIT        # deletes the secrets no matter what happens
sed -i 's/\r$//' "$ENV"
. "$ENV"

# --- network ---
uci set network.lan.ipaddr='192.168.77.1'
uci -q delete network.lan.ip6assign || true
uci -q delete network.globals.ula_prefix || true
uci -q delete network.wan6 || true
uci set network.wan.metric='10'   # wg0's default route (metric 0) beats the wan's

uci set network.wg0=interface
uci set network.wg0.proto='wireguard'
uci set network.wg0.private_key="$WG_PRIVKEY"
uci add_list network.wg0.addresses='10.66.66.2/24'
uci set network.wg0.mtu='1380'

uci set network.wgserver=wireguard_wg0
uci set network.wgserver.public_key="$SRV_PUBKEY"
uci set network.wgserver.preshared_key="$WG_PSK"
uci set network.wgserver.endpoint_host="$SRV_ENDPOINT"
uci set network.wgserver.endpoint_port="$SRV_PORT"
uci add_list network.wgserver.allowed_ips='0.0.0.0/0'
uci set network.wgserver.route_allowed_ips='1'
uci set network.wgserver.persistent_keepalive='25'

# --- firewall: the kill switch ---
# delete any lan->wan forwarding (uci -X = fixed section names)
for s in $(uci -X show firewall | sed -n 's/^firewall\.\([^.=]*\)=forwarding$/\1/p'); do
  [ "$(uci -q get firewall.$s.src)" = lan ] && [ "$(uci -q get firewall.$s.dest)" = wan ] && uci delete firewall.$s
done

uci set firewall.wg=zone
uci set firewall.wg.name='wg'
uci add_list firewall.wg.network='wg0'
uci set firewall.wg.input='REJECT'
uci set firewall.wg.output='ACCEPT'
uci set firewall.wg.forward='REJECT'
uci set firewall.wg.masq='1'
uci set firewall.wg.mtu_fix='1'

uci set firewall.lan_wg=forwarding
uci set firewall.lan_wg.src='lan'
uci set firewall.lan_wg.dest='wg'

# --- DHCP: no IPv6, DNS through the tunnel ---
uci set dhcp.lan.dhcpv6='disabled'
uci set dhcp.lan.ra='disabled'
uci set dhcp.lan.ndp='disabled'
uci add_list dhcp.lan.dhcp_option='6,1.1.1.1,1.0.0.1'

uci commit
/etc/init.d/odhcpd stop; /etc/init.d/odhcpd disable
/etc/init.d/network restart
/etc/init.d/firewall restart
/etc/init.d/dnsmasq restart

Why this is a real kill switch: the default route points at wg0. If the tunnel drops, Linux goes back to the wan route, but the firewall only has the lan → wg forwarding. There is no lan → wan, and the default forward policy is REJECT. Result: the packet dies at the router.

Gotcha #3 (scripting): in uci show, anonymous sections show up as @forwarding[0], and the index shifts when you delete one. Use uci -X show to get the fixed names (cfg04ad58).

Step 5: verification

wg show | grep -v key          # recent handshake + bytes both ways
ping -c3 10.66.66.1            # ping the VPS through the tunnel
ip route                       # "default dev wg0" + the VPS IP routed via wan
wget -qO- http://ifconfig.me/ip   # must show the VPS IP

Kill switch test:

ifdown wg0
nft list chain inet fw4 forward_lan   # only "accept_to_wg" + "accept_to_lan"
ifup wg0

No IPv6 on the lan: ip -6 addr show br-lan should show only the router's own fe80::, and odhcpd should be stopped.

Step 6 (bonus): Wi-Fi with a USB adapter

Identify the adapter:

lsusb    # 0bda:b812 Realtek RTL88x2bu

The RTL8822BU uses the rtw88 driver (in the mainline kernel, supports AP mode) and OpenWrt 24.10 ships the kmod-rtw88-8822bu package.

On the host, take the adapter away from Linux and pass it to the VM:

echo 'blacklist rtw88_8822bu' > /etc/modprobe.d/jumper-wifi-blacklist.conf
modprobe -r rtw88_8822bu
qm set 105 -usb0 host=0bda:b812,usb3=1
qm shutdown 105 && qm start 105

Use VID:PID, not the port: this adapter first shows up as USB2 and then reconnects as USB3, so the port path changes.

On OpenWrt:

opkg install kmod-rtw88-8822bu wpad-basic-mbedtls
uci set wireless.radio0.country='BR'
uci set wireless.radio0.band='5g'
uci set wireless.radio0.channel='36'
uci set wireless.radio0.htmode='VHT40'
uci set wireless.default_radio0.network='lan'
uci set wireless.default_radio0.mode='ap'
uci set wireless.default_radio0.ssid='MySSID'
uci set wireless.default_radio0.encryption='sae-mixed'   # WPA2/WPA3
uci set wireless.radio0.disabled='1'
uci commit wireless

Set the password without it showing on screen:

read -s -p "Wi-Fi password: " K; echo
uci set wireless.default_radio0.key="$K"; unset K
uci set wireless.radio0.disabled='0'
uci commit wireless && wifi reload

Gotcha #4: HOSTAPD_START_FAILED

If you install wpad with the system already running, two services end up stale:

  1. netifd only loads the mac80211.sh handler when it starts, so network.wireless stays empty.
  2. ubusd has not loaded wpad's ACL, so hostapd cannot register on ubus.

The fix (or simply reboot the VM):

/etc/init.d/network restart
killall -HUP ubusd
/etc/init.d/wpad restart
wifi up

Checking:

iw dev                                   # phy0-ap0, type AP, channel 36, 40 MHz
logread | grep hostapd                   # AP-ENABLED
iw dev phy0-ap0 station dump             # connected clients
cat /tmp/dhcp.leases                     # 192.168.77.x leases handed out

If 5 GHz is unstable, plan B is 2.4 GHz on channel 6 with 20 MHz (band=2g, channel=6, htmode=HT20).


Final checklist with the device

  • Connected and got an IP 192.168.77.x, gateway .1, DNS 1.1.1.1
  • ifconfig.me / ipleak.net show the VPS IP and no ISP DNS
  • test-ipv6.com: no IPv6
  • ifdown wg0 on the router: the device loses internet. ifup wg0: it comes back by itself
  • From the device, you cannot reach Proxmox or the home router
  • Video and calls without stalls (if they stall, lower the wg0 MTU to 1280)

Lessons learned

  1. Back up and read the diff before touching the host's network. One mistake in /etc/network/interfaces takes everything down.
  2. Watch out for repeated subnets: OpenWrt's default lan clashes with most home networks.
  3. Secrets do not go through chat. Use .env, scp, trap rm and, if one leaks, rotate the keys.
  4. The kill switch lives in the firewall, not in the route. Routes change on their own; a deleted forwarding does not come back.
  5. IPv6 is the forgotten leak. Turn it off on the lan and on the host.
  6. Installed a Wi-Fi package with the system running? Reboot. Saves half an hour of logs.

In the end, Jumper is a 256 MB VM that boots with Proxmox, reconnects the tunnel on its own and hands out "American" internet over cable or Wi-Fi, with no app on the phone at all.

Join the builders

New projects, the code behind them and what broke on the way. One e-mail when there is something worth opening.

We send a link to confirm. Leave anytime with one click. Never sold or shared. How we handle it

Comments

No comments yet. Start the conversation.

Sign in with Google to comment

Signing in keeps out bots and spam. Only your Google name and photo appear next to what you write; your e-mail is never shown.

Keep reading