Some services love borders.
Some devices pretend not to care
Until they’re denied at the digital gate.
But if IP is identity,
And routing is a mask…
Then what if we wore the right mask
At just the right time?
Some services love borders.
Some devices pretend not to care
Until they’re denied at the digital gate.
But if IP is identity,
And routing is a mask…
Then what if we wore the right mask
At just the right time?
A Borderless Broadcast - Region-locked Services
Have you ever encountered a service that disallows access if you’re coming from a foreign IP?
Today, we’ll look into a handy solution using a Raspberry Pi or VM equipped with WireGuard VPN to relay traffic from one home to appear as if it originates from another—effectively sidestepping IP-based geo restrictions.

The Scenario Setup
Let’s say you’ve got:
| Device | IP Address | Location |
|---|---|---|
| Router | — | Home 1 |
| TV | 192.168.0.200 | Home 1 |
| Computers | 192.168.0.1/24 | Home 1 |
| Raspberry Pi | 192.168.1.10 | Home 1 (different VLAN) |
| WireGuard Server | — | Home 2 (VPN endpoint) |
Goal: Make the TV (192.168.0.200) appear as if it’s in Home 2 by routing its traffic through a VPN via the Raspberry Pi.
Configuring the Router in Home 1
We start by creating a new routing table and marking the TV’s traffic to follow it.
Routing Table & iptables Rules
# Create a new routing table
echo "200 customvpn" >> /etc/iproute2/rt_tables
# Route local networks into the table
ip route add 192.168.0.0/24 dev br0 table customvpn
ip route add 192.168.1.0/24 dev br1 table customvpn
# Default gateway for the customvpn table
ip route add default via 192.168.1.10 dev br1 table customvpn
# Mark TV traffic
iptables -t mangle -A PREROUTING -s 192.168.0.200 -j MARK --set-mark 0x1
# Use routing table for marked packets
ip rule add from all fwmark 0x1 table customvpn
# Optional: disable reverse path filtering
echo 0 > /proc/sys/net/ipv4/conf/br1/rp_filter
What This Does
| Component | Function |
|---|---|
customvpn table | A new routing table for isolated routing decisions |
iptables MARK | Identifies TV’s traffic so rules can apply only to it |
ip rule | Redirects marked packets via the new routing path |
rp_filter | Disables strict path validation to allow asymmetric routing |
If your Pi or VM is on the same VLAN as the TV, reverse path filtering might not need to be disabled.
Preparing the Raspberry Pi or VM
The Raspberry Pi now acts as a router and masquerader, bridging LAN traffic into the VPN tunnel.
# Enable IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
# Allow TV's traffic through the VPN
iptables -A FORWARD -i eth0 -s 192.168.0.200 -o wg0 -j ACCEPT
# Allow return traffic from VPN
iptables -A FORWARD -i wg0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
# Rewrite source IP to Pi's VPN IP for internet access
iptables -t nat -A POSTROUTING -s 192.168.0.200 -o wg0 -j MASQUERADE
Flow Summary
| Direction | Interface | Action |
|---|---|---|
| TV → Pi → VPN | eth0 → wg0 | Forward and masquerade |
| VPN → Pi → TV | wg0 → eth0 | Accept if established |
DNS Redirection & VPN Hardening
Some apps ignore your DNS settings and try reaching Google DNS (8.8.8.8) or hardcoded endpoints. Let’s reroute rogue DNS requests and block unnecessary network access.
DNS Redirection
# Redirect DNS to router or Pi-hole
iptables -t nat -A PREROUTING -i wg0 -p udp --dport 53 -j DNAT --to-destination 192.168.0.1:53
iptables -t nat -A PREROUTING -i wg0 -p tcp --dport 53 -j DNAT --to-destination 192.168.0.1:53
Harden VPN Traffic
# Allow DNS
iptables -A FORWARD -i wg0 -d 192.168.0.1 --dport 53 -j ACCEPT
# Block access to private networks
iptables -A FORWARD -i wg0 -d 10.0.0.0/8 -j DROP
iptables -A FORWARD -i wg0 -d 172.16.0.0/12 -j DROP
iptables -A FORWARD -i wg0 -d 192.168.0.0/16 -j DROP
# Drop traffic to the VPN server/router itself
iptables -A INPUT -i wg0 -d [VPN server IP] -j DROP
With this setup:
- Your TV in Home 1 now exists virtually in Home 2.
- Region-locked services will treat it like it’s in the correct location.
- DNS hijacking is handled, and the VPN is locked down tight.
| What Works Well | What to Watch For |
|---|---|
| Seamless IP masking | Reverse path filtering can interfere |
| Isolated TV routing | Don’t forget to wake the Pi after reboot |
| DNS redirection control | Test it against stubborn apps/services |
The configuration requires some familiarity with iptables and routing—but the control and flexibility you gain makes it more than worthwhile.
Buy Me a Coffee