What it does

One SSID, anywhere in the world — you land on your own home LAN.

One SSID, everywhere

Join AnchorPoint Home Network on your laptop or phone and you are on your home network — same DNS, same exit IP, same geolocation.

Firewall-friendly (optional)

Default is the standard WireGuard port UDP 51820. On a Linux home server you can run it on UDP/443 instead — indistinguishable from HTTPS, so hotel, airport and corporate firewalls that block "real" VPN ports still let it out.

Automatic uplink failover

Wired LAN if present, else venue Wi-Fi, else your phone hotspot. Priority-based, self-healing, no manual switching.

Self-hosted & open

Home end is a plain FRITZ!Box or any Linux box. No cloud VPN provider, no subscription. Every command is on GitHub under MIT.

Two networks, one tunnel

Keep home (the exit point) and travel (where the MikroTik is) separate — everything else follows.

TRAVEL NETWORKHotel · café · airport · client site Laptop192.168.20.x Phone / TV192.168.20.x MikroTik hAP ax2WireGuard clientSSID: AnchorPoint Home NetworkLAN 192.168.20.1/24 UPLINK — best available1 · Wired LAN (ether1)2 · Venue Wi-Fi → 3 · Phone hotspot (wifi2) INTERNET WireGuard tunnel · UDP 51820 HOME NETWORKYour house / office — the EXIT POINT The whole internetreached as if you were at home FRITZ!Box / LinuxWireGuard server · listens UDP 51820DDNS hostnameTunnel 10.0.80.1/24 Home internet lineYour home IP · your home DNS

Travel devices sit on 192.168.20.0/24, tunnel over WireGuard (UDP 51820 by default) to the home server (10.0.80.1), and exit onto the home internet line.

Home networkTravel network
WhereYour house / officeHotel, café, airport, client site
HardwareFRITZ!Box or Linux + WireGuard serverMikroTik hAP ax2 — WireGuard client
RoleExit point — traffic reaches the internet hereEntry point — collects your devices
WireGuardListens on UDP 51820 (configurable)Dials out to home on the server's port
Subnet10.0.80.0/24 (tunnel), server 10.0.80.1192.168.20.0/24, gateway 192.168.20.1

Prerequisite: a home WireGuard server

AnchorPoint consumes a WireGuard server — it does not create one. Build the home end first.

The home network is the exit point. You need a WireGuard server running at home before the travel router has anything to dial into. The easiest path is a FRITZ!Box (FRITZ!OS 7.50+ has WireGuard built in); any Linux host works too.

AFRITZ!Box WireGuard server

  1. Open http://fritz.box → Internet → Permit Access → VPN (WireGuard) → Add connection.
  2. Choose the custom / "specific application" option (not the guided MyFRITZ!-app one) so you can export a raw config.
  3. Name it anchorpoint-travel-router. The box generates a key pair and a client config — download / copy it.
  4. Note the UDP port the FRITZ!Box assigns to this connection (it is shown in the exported config) — the travel router dials exactly that. If the FRITZ!Box sits behind another modem, add a port forward UDP <that-port> → FRITZ!Box there. (Standard WireGuard is 51820; a Linux server can use 443 to look like HTTPS for restrictive firewalls.)
  5. Set up DDNS so the travel router always finds home: Internet → MyFRITZ!-Account gives a free xxxx.myfritz.net name, or use Internet → Permit Access → DynDNS for your own provider.

Verify before you leave home. Import the client config into the WireGuard phone app over mobile data and connect, then open ifconfig.me. It must show your home IP — that proves home is the exit point.

Exported home client config (redacted)
[Interface]
PrivateKey = <CLIENT_PRIVATE_KEY>
Address    = 10.0.80.3/24
DNS        = 10.0.80.1

[Peer]
PublicKey           = <SERVER_PUBLIC_KEY>
Endpoint            = home.example.myfritz.net:51820
AllowedIPs          = 0.0.0.0/0, ::/0
PersistentKeepalive = 25

BLinux WireGuard server (alternative)

Prefer a Raspberry Pi / mini-PC / VPS? Run WireGuard on ListenPort = 51820 (or 443 if you want it to look like HTTPS for restrictive firewalls), masquerade the tunnel out to the internet, forward that UDP port on the router in front of it, and add DDNS. Full server snippet is in the repo at config/wireguard-client.conf.example.

Travel router: MikroTik hAP ax2

Configure in WinBox → New Terminal. Paste in order; replace every <PLACEHOLDER>.

1Time & timezone (WireGuard needs a correct clock)
/system/ntp/client/set enabled=yes
/system/ntp/client/servers/add address=pool.ntp.org
/system/clock/set time-zone-name=Europe/Berlin
2Type in the WireGuard client config
/interface/wireguard/wg-import config-string="
[Interface]
PrivateKey = <CLIENT_PRIVATE_KEY>
Address    = 10.0.80.3/24
DNS        = 10.0.80.1

[Peer]
PublicKey           = <SERVER_PUBLIC_KEY>
Endpoint            = home.example.myfritz.net:51820
AllowedIPs          = 0.0.0.0/0,::/0
PersistentKeepalive = 25
"

The import creates interface wg1. AllowedIPs = 0.0.0.0/0 is a full tunnel — that is what makes home the exit point. Endpoint … :<port> dials the home server's WireGuard port. On a Linux server set it to 443 so it looks like HTTPS and restrictive venue firewalls allow it.

3Travel LAN 192.168.20.0/24, routed through the tunnel
# dedicated VPN bridge on ether2
/interface bridge port remove [find interface=ether2]
/interface bridge add name=bridge-vpn
/interface bridge port add bridge=bridge-vpn interface=ether2
/ip address add address=192.168.20.1/24 interface=bridge-vpn

# policy route: whole travel LAN exits via the tunnel
/routing table add name=to-vpn fib
/ip route add dst-address=0.0.0.0/0 gateway=wg1 routing-table=to-vpn
/routing rule add src-address=192.168.20.0/24 action=lookup-only-in-table table=to-vpn
/ip firewall nat add action=masquerade chain=srcnat out-interface=wg1

# DHCP for your devices, DNS pointed at home (no DNS leak)
/ip pool add name=vpn-pool ranges=192.168.20.10-192.168.20.100
/ip dhcp-server add address-pool=vpn-pool interface=bridge-vpn name=dhcp-vpn
/ip dhcp-server network add address=192.168.20.0/24 dns-server=10.0.80.1 gateway=192.168.20.1
4MTU / MSS — prevents "connects but nothing loads"
/interface wireguard set wg1 mtu=1412
/ip firewall mangle add action=change-mss chain=forward new-mss=1280 out-interface=wg1 protocol=tcp tcp-flags=syn tcp-mss=1281-65535
/ip firewall mangle add action=change-mss chain=forward new-mss=1280 in-interface=wg1  protocol=tcp tcp-flags=syn tcp-mss=1281-65535
5Broadcast the "AnchorPoint Home Network" SSID
/interface/wifi/add name=wifi-vpn-5ghz master-interface=wifi1 \
    configuration.ssid="AnchorPoint Home Network" \
    security.passphrase="<HOME_NETWORK_PASSWORD>" \
    security.authentication-types=wpa2-psk,wpa3-psk disabled=no
/interface/bridge/port add bridge=bridge-vpn interface=wifi-vpn-5ghz

The 5 GHz radio (wifi1) broadcasts your home network. The 2.4 GHz radio (wifi2) is reserved as the uplink radio for venue Wi-Fi / hotspot below. (Use both radios for the home SSID only when your uplink is the wired ether1 port.)

The router keeps the highest-priority uplink that has working internet — and heals itself.

Uplink priority & failover The router keeps the highest-priority uplink that has working internet. 1Wired LANether1 · route distance 1RJ45 wall port / desk switchHighest priority — always wins if plugged in 2Venue Wi-Fiwifi2 station · distance 10Hotel / café / airport SSID 3Phone hotspotwifi2 station · fallbackYour phone's personal hotspot if no cableif Wi-Fi dead How it decides ether1 carries the route at distance 1; wifi2 at distance 10. RouterOS always uses the lowest-distance uplink that has areachable gateway — so a plugged-in cable instantly wins. check-gateway=ping drops ether1 the moment the cable isunplugged, falling back to wireless automatically. WAN-Watchdog pings 8.8.8.8 every 30 s. If the current wirelessuplink is dead it flips wifi2 to the other profile. Probe-Venue runs every 15 min to climb back to venue Wi-Fi,so you stop burning phone data as soon as it recovers. Self-healing · no manual switching needed

Priority: wired LAN (ether1) → venue Wi-Fi (wifi2) → phone hotspot (wifi2). Wired always wins when a cable is present.

1Turn wifi2 into a WAN station (uplink radio)
/interface/bridge/port/remove [find interface=wifi2]
/interface/list/member/add interface=wifi2 list=WAN
/interface/wifi/unset wifi2 configuration.mode
/interface/wifi/unset wifi2 configuration.ssid
/interface/wifi/unset wifi2 security.authentication-types
/interface/wifi/unset wifi2 security.passphrase
/interface/wifi/set wifi2 security.ft=no
/interface/wifi/set wifi2 security.ft-over-ds=no
2Type in the venue Wi-Fi SSID + password
/interface wifi security add name=wifi-sec-venue \
    authentication-types=wpa2-psk,wpa3-psk passphrase="<VENUE_WIFI_PASSWORD>"
/interface wifi configuration add name=wifi-cfg-venue mode=station \
    ssid="<VENUE_WIFI_SSID>" security=wifi-sec-venue disabled=no datapath.bridge=none
3Type in the phone hotspot SSID + password
/interface wifi security add name=wifi-sec-hotspot \
    authentication-types=wpa2-psk,wpa3-psk passphrase="<PHONE_HOTSPOT_PASSWORD>"
/interface wifi configuration add name=wifi-cfg-hotspot mode=station \
    ssid="<PHONE_HOTSPOT_SSID>" security=wifi-sec-hotspot disabled=no datapath.bridge=none
4Start on venue Wi-Fi (distance 10); keep wired ether1 top priority (distance 1)
/interface/wifi set wifi2 configuration=wifi-cfg-venue
/ip/dhcp-client/add interface=wifi2 disabled=no default-route-distance=10 comment="WiFi-WAN-Uplink"
/ip/dhcp-client/set [find interface=ether1] check-gateway=ping

The failover scripts (Switch-To-Venue, Switch-To-Hotspot), the WAN-Watchdog netwatch and the 15-minute Probe-Venue scheduler are in the repo file config/mikrotik-uplink-failover.rsc. To change hotels: /interface wifi configuration set wifi-cfg-venue ssid="<NEW_SSID>" then /system/script/run Switch-To-Venue.

Ports used — home vs. travel

Home exposes exactly one inbound port; travel needs exactly one outbound port.

Home network (WireGuard server — exit point)

PortProtoDirectionPurpose
51820UDPInbound (internet → server)WireGuard listener (configurable) — port-forward this to the server. The only inbound port. Set 443 on a Linux server to look like HTTPS for restrictive firewalls.
53UDP/TCPInternalDNS resolver (10.0.80.1) that tunnel clients use. Stays on the LAN.
123UDPOutboundNTP time sync.
—DDNSOutboundHostname (e.g. myfritz.net) tracking the changing home IP.

Travel network (MikroTik hAP ax2 — client)

PortProtoDirectionPurpose
51820UDPOutbound (router → home)The only port the tunnel needs. Dials the home server's WireGuard port (51820 by default). Use 443 on a Linux server to survive restrictive venue/corporate firewalls.
67 / 68UDPBothDHCP — client on the uplinks (ether1, wifi2); server on bridge-vpn handing out 192.168.20.x.
53UDP/TCPInternal → tunnelDNS from your devices, forwarded to home's resolver. Does not leak to the venue.
123UDPOutboundNTP — correct time is mandatory or the WireGuard handshake fails.

In one line: home opens only its WireGuard UDP port inbound; travel needs only that one UDP port outbound. Both 10.0.80.0/24 (tunnel) and 192.168.20.0/24 (travel LAN) stay private and are never reachable from the venue.

Second mode: site-to-site link

Two fixed locations, each the other's gateway and internet exit — config-driven and leak-proof.

Same WireGuard foundation, a different shape. Instead of one roaming router dialing home, you join two of your own sites with a single tunnel so each can exit through the other. Plug into a port — or join a Wi-Fi SSID — at site A and you browse as if you were at site B, and vice versa. You describe the two sites in one small YAML file; a generator renders the complete, reproducible RouterOS config for both ends, with every key and password encrypted and never committed.

Recent additions: per-site Wi-Fi WAN failover is now active/standby — the backup comes up only when the wired cable drops, so it never collides with the primary (safe even on the same router). The tunnel MTU defaults to 1412 (fits PPPoE/DSL and fibre), and on-box management is pinned to the LAN side.

Each site: local devices (ether3–5 + its own Wi-Fi) use that site's own WAN; exit traffic (ether2 + the other site's Wi-Fi SSID) tunnels out at the far site. Leak-proof (fail-closed) — if the tunnel drops, exit traffic is dropped, never leaked.

Both-way exit

Each site is a gateway and an exit for the other. Join AnchorPoint-<site> at one location to browse from the other country.

Leak-proof (fail-closed)

Each exit subnet is policy-routed into its tunnel with lookup-only-in-table — no fallback to the local WAN. Tunnel down ⇒ dropped, never leaked.

Config-driven

One inventory → gen-mesh-secrets.py (encrypted keys + passwords) → render-mesh.py renders both ends. Validated on RouterOS CHR 7.20.8.

Self-healing

A per-tunnel netwatch watchdog escalates by priority — first re-sync the clock (NTP), then restart the tunnel if it is still down.

Test clients (iPhone + MacBook)

Each site also serves a couple of roaming WireGuard clients on wg-clients — dial in from your iPhone or MacBook and you exit at that site, so you can verify each location end-to-end.

Wi-Fi WAN failover (active/standby)

Give a site a Wi-Fi backup uplink and it stays online if the wired ether1 drops. Active/standby — the backup is raised only while the cable is down, so the two WANs never collide: safe even when the backup is the same router's Wi-Fi.

DSL-ready & hardened

Tunnel MTU defaults to 1412 — fits PPPoE/DSL (FRITZ!Box) and fibre, so large pages never hang. MAC-Telnet, WinBox-over-MAC and neighbour discovery are pinned to the LAN side; FastTrack stays off so the leak-proof routing holds.

The full config-driven workflow — inventory, generator, templates and example output — is in the repo: github.com/alex-xpertone/anchorpoint (inventory/example.yaml, docs/ONBOARDING.md).