Free weekly email: the week's new posts, videos and one tip from the books, every Sunday. Get it free →
Homelab the Right Way

Home › Posts

Home IP or VPN? Choose egress per service

Learn which services must exit via your residential IP and which belong on a VPN, then verify each container's actual egress point using policy-based routing.

· 4 min read · homelabvpnopnsensenetworkingcontainerssecurity

Home IP or VPN? Choose egress per service

Most new homelabbers size their network trust for the services they add today. That is the trap. A single downloader looks harmless behind a VPN on day one, and nothing about it looks wrong until you try to reach your reverse proxy or send an email. The far end sees a datacenter IP shared with thousands of strangers, and the connection fails in confusing ways.

The book opens its networking chapter with exactly this warning: once you have a VPN in your firewall, it is tempting to send everything through it. Don't. Some services work better through a VPN. Others break because the destination sees a datacenter IP instead of your home address. This post covers which services belong where, how to split the traffic cleanly, and how to verify egress from each guest so you stop guessing.

One caveat, straight from the book: this guidance assumes you are using policy-based routing in OPNsense with containers managed by PCT. Your stack may differ, but the principle of explicit egress selection remains the same.

The trap: assuming one exit fits all

The usual way people find out their setup is wrong is that a service stops working after they enable the VPN kill switch. They check logs, restart containers, and blame DNS. The book's answer is to treat egress as a per-service configuration, not a global toggle.

When you send everything through a VPN, services that require your residential identity break. Banks, carmakers, utilities, social bridges, inbound servers, VoIP trunks, email relays, and location-dependent apps all behave oddly or block you entirely when they see a datacenter IP. The fix is to keep a strict separation between traffic that needs your home IP and traffic that benefits from privacy.

Services that must exit on your home IP

Certain services rely on your actual residential address for authentication, connectivity, or location accuracy. If these exit through a VPN, they will fail or degrade.

Connected-car APIs, bank aggregators, and smart meter portals often block VPN and datacenter IPs outright. They may force endless captchas or re-verification loops that are impossible to resolve automatically. Social and messaging bridges face similar issues; bots and scrapers that log in to social apps get flagged or logged out when the login IP jumps to a VPN range.

Inbound services such as port forwards, reverse proxies, game servers, or self-hosted VPNs require traffic to come in on your home IP. Consumer VPNs rarely offer port forwarding, and the ones that do change ports unpredictably. VoIP and SIP trunks register you by IP address, and RTP audio hates extra NAT and latency. One-way audio is the classic symptom of a misconfigured exit point.

Email delivery is another hard constraint. If you send mail, a VPN exit IP is almost certainly on a blocklist, causing your messages to bounce or land in spam folders. Location-dependent services like streaming, weather, and local-news integrations also behave oddly when you appear to be in another city. For all these cases, the service must exit via your home WAN interface.

Services that are fine through a VPN

Other workloads benefit from privacy or anonymity and should be routed through the VPN tunnel. Guest Wi-Fi is the primary example; you do not want visitors' traffic tied to your residential IP. Downloaders, torrent clients, and public-tracker traffic also belong on the VPN to avoid exposing your home address to public indexes.

General browsing from devices you have chosen to make private fits this category as well. Any service that fetches public data without logging in can safely use the VPN exit point. The key is intent: if the service does not need your identity or location, and it does not require inbound connectivity, route it through the tunnel.

How to split egress cleanly

Policy-based routing in OPNsense handles this separation cleanly. The pattern applies a consistent rule across your infrastructure: put VPN-bound clients on their own network or in an alias of individual IPs, with a policy rule pointing to the VPN gateway and the kill switch from the hardening chapter. Everything else, including the servers network, exits via WAN.

When a service needs both inbound and outbound capabilities, such as a downloader that also has a web UI you reach remotely, keep the inbound UI on Tailscale or the LAN, and send the outbound traffic on the VPN. This ensures you can reach the interface while keeping the data flow private.

Verify egress from each guest, not just from your desktop. You must confirm that every container is using the intended exit point. Use the following command to check multiple containers at once:

for id in 120 121 122; do
  echo -n "$id: "
  pct exec $id -- curl -s --max-time 5 https://ifconfig.me; echo
done

Keep a two-column table in your documentation listing each service and its required exit point. When something mysteriously breaks after a network change, that table is the first thing to check. It saves hours of debugging by making the expected behavior explicit rather than assumed.

Checklist

  • Identify all services that require your residential IP for authentication or inbound connectivity.
  • Move guest Wi-Fi, downloaders, and public-tracker traffic to the VPN gateway.
  • Configure policy-based routing in OPNsense to separate VPN-bound clients from WAN-bound servers.
  • Keep inbound web UIs on LAN or Tailscale while routing outbound data through the VPN.
  • Run the PCT curl verification script against every container ID you manage.
  • Document each service and its required exit IP in a two-column table.
  • Review the table whenever you change network settings or add new services.

More articles