{"id":533,"date":"2026-10-07T08:00:00","date_gmt":"2026-10-07T06:00:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/?page_id=533"},"modified":"2026-11-15T12:06:19","modified_gmt":"2026-11-15T11:06:19","slug":"accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/","title":{"rendered":"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway"},"content":{"rendered":"<p>A Raspberry Pi can provide WireGuard access to a home network. Split tunneling sends only selected destination networks through the tunnel; other internet traffic continues over the client&#8217;s local connection. This guide limits VPN access to an IPv4 home network and adds actual filtering. Masquerading replaces the client\u2019s source address with the Pi\u2019s address when forwarding packets. This makes replies easier to route, but does not itself restrict access.<\/p>\n<p>WireGuard is integrated into the Linux kernel. This does not imply a fixed throughput: the Pi model, CPU, network, peer and connection all affect performance. Linux IPsec also normally processes data in the kernel, and OpenVPN can use Data Channel Offload. Claims of more than 800 Mbps, negligible CPU usage or zero-latency access require measurements.<\/p>\n<h2>1. Example network and access limits<\/h2>\n<ul><li>Home network: <code>192.168.10.0\/24<\/code>; Pi at a stable <code>192.168.10.2<\/code> address on <code>eth0<\/code>.<\/li><li>WireGuard server: <code>10.100.0.1<\/code>; one separately identified client at <code>10.100.0.2<\/code>.<\/li><li>Allowed: client connections to IPv4 home-network destinations and associated replies.<\/li><li>Blocked: forwarding to other networks, new LAN-to-client connections, and access from <code>wg0<\/code> to services running on the Pi itself.<\/li><\/ul>\n<p>These example networks must not overlap each other or the client&#8217;s current local network. <code>eth0<\/code> must match the actual LAN interface. For IPv4 access, the router needs UDP forwarding for the selected port 51820 to the Pi, and the existing host firewall must permit that outer UDP traffic. Individual LAN web or storage ports need no public forwarding. With carrier-grade NAT, the internet provider shares a public IPv4 address between several connections. Local port forwarding is then often insufficient; a different reachable access path is needed.<\/p>\n<figure class=\"lw-diagram\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/dia-533-review-20261024.png?v=20261115\" width=\"1120\" height=\"580\" alt=\"WireGuard split tunnel with destination routes, access filters and restricted NAT\"><figcaption>Client routes select the home network. Server filters enforce access limits; masquerading only supplies the LAN return path.<\/figcaption><\/figure>\n<h2>2. Tools and keys<\/h2>\n<p>On current Raspberry Pi OS, the tools are installed with <code>sudo apt update<\/code> and <code>sudo apt install wireguard-tools nftables<\/code>. The following key generation runs in a root Bash shell. The restrictive umask applies from creation, while <code>set -C<\/code> prevents overwriting existing key files.<\/p>\n<figure style=\"--cbb-digits:1\" class=\"cbb cbb--wrap cbb--numbers wp-block-code-beautifier-block-code\" data-lang=\"bash\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Shell<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" aria-label=\"Copy code\" data-cbb-status-done=\"Code copied to the clipboard.\" data-cbb-status-failed=\"Copying failed. The code is selected for copying with Ctrl+C or \u2318+C.\" data-cbb-status-noselect=\"Copying failed.\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code example: Shell\"><code class=\"cbb-code language-bash\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-comment\"># In a root Bash shell, on the server:<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-keyword\">set<\/span> <span class=\"cbb-attr\">-euo<\/span> pipefail\n<\/span><span class=\"cbb-line\">umask <span class=\"cbb-number\">077<\/span>\n<\/span><span class=\"cbb-line\">install <span class=\"cbb-attr\">-d<\/span> <span class=\"cbb-attr\">-m<\/span> <span class=\"cbb-number\">700<\/span> \/etc\/wireguard\n<\/span><span class=\"cbb-line\"><span class=\"cbb-function\">cd<\/span> \/etc\/wireguard\n<\/span><span class=\"cbb-line\"><span class=\"cbb-keyword\">set<\/span> <span class=\"cbb-attr\">-C<\/span>\n<\/span><span class=\"cbb-line\">wg genkey <span class=\"cbb-operator\">&gt;<\/span> server_private.key\n<\/span><span class=\"cbb-line\">wg pubkey &lt; server_private.key <span class=\"cbb-operator\">&gt;<\/span> server_public.key<\/span><\/code><\/pre><span class=\"cbb-status\" role=\"status\"><\/span><\/figure>\n<p>The client creates a separate key pair locally. Only public keys are exchanged between devices. Private keys do not belong in shared notes or screenshots. Configuration files also contain private keys and need mode 600: only the file owner receives read and write permissions; group members and other accounts receive none.<\/p>\n<h2>3. Forwarding restrictions with filters<\/h2>\n<p>The following content belongs in <code>\/etc\/nftables.d\/wireguard.nft<\/code>. The names <code>wg_guard<\/code> and <code>wg_nat<\/code> must be reserved for this configuration. Repeated loading replaces only these owned tables, not the entire ruleset. Syntax is checked before activation with <code>sudo nft -c -f \/etc\/nftables.d\/wireguard.nft<\/code>.<\/p>\n<figure style=\"--cbb-digits:2\" class=\"cbb cbb--wrap cbb--numbers wp-block-code-beautifier-block-code\" data-lang=\"plain\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Text<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" aria-label=\"Copy code\" data-cbb-status-done=\"Code copied to the clipboard.\" data-cbb-status-failed=\"Copying failed. The code is selected for copying with Ctrl+C or \u2318+C.\" data-cbb-status-noselect=\"Copying failed.\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code example: Text\"><code class=\"cbb-code language-plain\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"># Owned tables only; repeated loads replace these rules atomically.\n<\/span><span class=\"cbb-line\">add table inet wg_guard\n<\/span><span class=\"cbb-line\">flush table inet wg_guard\n<\/span><span class=\"cbb-line\">table inet wg_guard {\n<\/span><span class=\"cbb-line\">  chain input {\n<\/span><span class=\"cbb-line\">    type filter hook input priority -10; policy accept;\n<\/span><span class=\"cbb-line\">    iifname \"wg0\" counter drop\n<\/span><span class=\"cbb-line\">  }\n<\/span><span class=\"cbb-line\">  chain forward {\n<\/span><span class=\"cbb-line\">    type filter hook forward priority -10; policy accept;\n<\/span><span class=\"cbb-line\">    iifname \"wg0\" ct state invalid counter drop\n<\/span><span class=\"cbb-line\">    iifname \"wg0\" oifname \"eth0\" ip saddr 10.100.0.2 ip daddr 192.168.10.0\/24 ct state { new, established, related } counter accept\n<\/span><span class=\"cbb-line\">    iifname \"eth0\" oifname \"wg0\" ip saddr 192.168.10.0\/24 ip daddr 10.100.0.2 ct state { established, related } counter accept\n<\/span><span class=\"cbb-line\">    iifname \"wg0\" counter drop\n<\/span><span class=\"cbb-line\">    oifname \"wg0\" counter drop\n<\/span><span class=\"cbb-line\">  }\n<\/span><span class=\"cbb-line\">}\n<\/span><span class=\"cbb-line\">add table ip wg_nat\n<\/span><span class=\"cbb-line\">flush table ip wg_nat\n<\/span><span class=\"cbb-line\">table ip wg_nat {\n<\/span><span class=\"cbb-line\">  chain postrouting {\n<\/span><span class=\"cbb-line\">    type nat hook postrouting priority srcnat; policy accept;\n<\/span><span class=\"cbb-line\">    iifname \"wg0\" oifname \"eth0\" ip saddr 10.100.0.2 ip daddr 192.168.10.0\/24 counter masquerade\n<\/span><span class=\"cbb-line\">  }\n<\/span><span class=\"cbb-line\">}<\/span><\/code><\/pre><span class=\"cbb-status\" role=\"status\"><\/span><\/figure>\n<p>The filter permits only the specified tunnel source and home-network destination. NAT masquerades exactly this traffic to the Pi&#8217;s LAN address. LAN hosts can therefore reply directly to the Pi without an additional route to the tunnel network. The trade-off is that LAN logs show the Pi&#8217;s address rather than the original client address.<\/p>\n<p>The <code>accept<\/code> policy leaves unrelated traffic unchanged within these additional tables. Other existing base chains can still reject permitted packets, so integration with the current firewall is necessary. UFW, firewalld or Docker must not silently replace or bypass the rules; accelerated flowtables must exclude VPN traffic from a possible filter bypass. On a Pi managed exclusively with nftables, <code>include \"\/etc\/nftables.d\/wireguard.nft\"<\/code> can incorporate the file into the maintained persistent ruleset. Later firewall reloads must retain these rules.<\/p>\n\n\n<!-- lw-flux-illu 533-a3 -->\n<figure class=\"lw-illu\"><img src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/illustrationen\/flux-533-a3.webp\" width=\"1120\" height=\"630\" loading=\"lazy\" decoding=\"async\" alt=\"A hamster tube leads only into the cage; the second branch into the room is closed with a cap. Likewise, filter rules limit where connections from the VPN may be passed on.\"><figcaption>A hamster tube leads only into the cage; the second branch into the room is closed with a cap. Likewise, filter rules limit where connections from the VPN may be passed on.<\/figcaption><\/figure>\n\n\n<h2>4. IPv4 forwarding and server configuration<\/h2>\n<p>This example carries IPv4 destinations. IPv6 forwarding is not required and is not enabled indiscriminately. The additional <code>inet<\/code> filter also drops IPv6 forwarding through <code>wg0<\/code> if IPv6 is already enabled elsewhere.<\/p>\n<figure style=\"--cbb-digits:1\" class=\"cbb cbb--wrap wp-block-code-beautifier-block-code\" data-lang=\"ini\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Config<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" aria-label=\"Copy code\" data-cbb-status-done=\"Code copied to the clipboard.\" data-cbb-status-failed=\"Copying failed. The code is selected for copying with Ctrl+C or \u2318+C.\" data-cbb-status-noselect=\"Copying failed.\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code example: Config\"><code class=\"cbb-code language-ini\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-comment\"># \/etc\/sysctl.d\/99-wireguard-forwarding.conf<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">net.ipv4.ip_forward<\/span> =<span class=\"cbb-number\"> 1<\/span><\/span><\/code><\/pre><span class=\"cbb-status\" role=\"status\"><\/span><\/figure>\n<p><code>sudo sysctl -p \/etc\/sysctl.d\/99-wireguard-forwarding.conf<\/code> applies this file specifically. The example does not impose a global reverse-path filter value. Changing <code>ip_forward<\/code> can reset IPv4 parameters to router defaults; existing hardening settings need checking afterwards. Strict <code>rp_filter=1<\/code> can reject legitimate asymmetric routes or complex policy-routing paths, so the setting must match the topology.<\/p>\n<figure style=\"--cbb-digits:2\" class=\"cbb cbb--wrap cbb--numbers wp-block-code-beautifier-block-code\" data-lang=\"ini\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Config<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" aria-label=\"Copy code\" data-cbb-status-done=\"Code copied to the clipboard.\" data-cbb-status-failed=\"Copying failed. The code is selected for copying with Ctrl+C or \u2318+C.\" data-cbb-status-noselect=\"Copying failed.\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code example: Config\"><code class=\"cbb-code language-ini\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-comment\"># \/etc\/wireguard\/wg0.conf<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-type\">&#91;Interface&#93;<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">Address<\/span> = 10.100.0.1\/24\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">ListenPort<\/span> =<span class=\"cbb-number\"> 51820<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">PrivateKey<\/span> = &lt;SERVER_PRIVATE_KEY&gt;\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">PreUp<\/span> = \/usr\/sbin\/nft -f \/etc\/nftables.d\/wireguard.nft\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\"><span class=\"cbb-type\">&#91;Peer&#93;<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">PublicKey<\/span> = &lt;CLIENT_PUBLIC_KEY&gt;\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">AllowedIPs<\/span> = 10.100.0.2\/32<\/span><\/code><\/pre><span class=\"cbb-status\" role=\"status\"><\/span><\/figure>\n<p>Actual keys replace the placeholders. <code>PreUp<\/code> loads the filters before creating the interface; a loading error stops startup. Rules remain after shutdown and are replaced on the next start. This avoids a partially executed sequence of unprotected <code>PostUp<\/code> NAT commands. UDP 51820 is an explicit choice here; WireGuard can choose a random port when no listening port is configured.<\/p>\n<p>After checking firewall integration and file permissions, <code>sudo systemctl enable --now wg-quick@wg0<\/code> starts the service. The hardening covers this VPN path. Operating-system updates, SSH, other host services and LAN permissions still need independent maintenance.<\/p>\n<h2>5. Split-tunnel client configuration<\/h2>\n<figure style=\"--cbb-digits:2\" class=\"cbb cbb--wrap cbb--numbers wp-block-code-beautifier-block-code\" data-lang=\"ini\"><figcaption class=\"cbb-head\"><span class=\"cbb-lang\">Config<\/span><span class=\"cbb-actions\"><button type=\"button\" class=\"cbb-button cbb-button--wrap\" data-cbb-action=\"wrap\" aria-pressed=\"true\" title=\"Wrap long lines\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><path d=\"M2 4h12M2 8h9.5a2.5 2.5 0 0 1 0 5H8m0 0 1.5-1.5M8 13l1.5 1.5M2 12h3\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/><\/svg><span class=\"cbb-sr\">Wrap long lines<\/span><\/button><button type=\"button\" class=\"cbb-button cbb-button--copy\" data-cbb-action=\"copy\" aria-label=\"Copy code\" data-cbb-status-done=\"Code copied to the clipboard.\" data-cbb-status-failed=\"Copying failed. The code is selected for copying with Ctrl+C or \u2318+C.\" data-cbb-status-noselect=\"Copying failed.\"><svg aria-hidden=\"true\" focusable=\"false\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><rect x=\"5.5\" y=\"5.5\" width=\"8\" height=\"8.5\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><path d=\"M10.5 3.5V3A1.5 1.5 0 0 0 9 1.5H4A1.5 1.5 0 0 0 2.5 3v6.5A1.5 1.5 0 0 0 4 11h.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\"\/><\/svg><span class=\"cbb-button-label\">Copy<\/span><\/button><\/span><\/figcaption><pre class=\"cbb-pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code example: Config\"><code class=\"cbb-code language-ini\" style=\"counter-reset:cbb-line 0;\"><span class=\"cbb-line\"><span class=\"cbb-type\">&#91;Interface&#93;<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">PrivateKey<\/span> = &lt;CLIENT_PRIVATE_KEY&gt;\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">Address<\/span> = 10.100.0.2\/32\n<\/span><span class=\"cbb-line\">\n<\/span><span class=\"cbb-line\"><span class=\"cbb-type\">&#91;Peer&#93;<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">PublicKey<\/span> = &lt;SERVER_PUBLIC_KEY&gt;\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">Endpoint<\/span> = vpn.example.net:<span class=\"cbb-number\">51820<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">AllowedIPs<\/span> = 192.168.10.0\/24\n<\/span><span class=\"cbb-line\"><span class=\"cbb-comment\"># Optional for a client behind NAT:<\/span>\n<\/span><span class=\"cbb-line\"><span class=\"cbb-attr\">PersistentKeepalive<\/span> =<span class=\"cbb-number\"> 25<\/span><\/span><\/code><\/pre><span class=\"cbb-status\" role=\"status\"><\/span><\/figure>\n<p><code>vpn.example.net<\/code> is a placeholder for the actual reachable endpoint. The client application or <code>wg-quick<\/code> creates routes from <code>AllowedIPs<\/code>. WireGuard itself uses these prefixes to select a peer for outgoing destinations and validate source addresses on received packets. Server-side <code>AllowedIPs = 10.100.0.2\/32<\/code> therefore does not replace destination or port filtering.<\/p>\n<p>Changing the client to <code>0.0.0.0\/0<\/code> does not enable internet forwarding through the Pi with these filters. Additional peers need separate keys, unique tunnel addresses and matching firewall rules. <code>PersistentKeepalive = 25<\/code> can preserve NAT mappings; the line can be omitted when unnecessary.<\/p>\n<h2>6. Checks for access and restrictions<\/h2>\n<ol><li>During active test traffic, <code>sudo wg show wg0<\/code> shows handshake and transfer statistics. An old timestamp for an idle peer does not itself prove failure. <code>wg show ... dump<\/code> and <code>showconf<\/code> can expose private information and should not enter public diagnostic logs.<\/li><li>On a Linux client, <code>ip route get 192.168.10.10<\/code> checks the home-network route. With this client configuration, <code>ip route get 1.1.1.1<\/code> must still show the local internet path. Other operating systems require equivalent routing diagnostics.<\/li><li>An allowed LAN service must be reachable. Internet destinations through a deliberately full-tunnel test client and Pi services at the tunnel address must remain blocked. Counters in <code>sudo nft list table inet wg_guard<\/code> help identify matching rules.<\/li><li>An authorized <code>iperf3<\/code> test measures actual throughput. CPU load, home upload speed, peer performance and MTU limit the result; a high number alone proves neither link saturation nor absence of fragmentation.<\/li><\/ol>\n<div class=\"lw-faq\"><h2>Questions and answers<\/h2><h3>Does the split tunnel encrypt all internet traffic?<\/h3><p>No. Only the permitted home network uses WireGuard here. Other IPv4 and IPv6 internet traffic stays on the local connection. This is the intended split, not a general anonymity service. Tunnel encryption ends at the Pi; protocols such as HTTPS still matter for confidentiality across the LAN.<\/p><h3>Why is there no DNS setting?<\/h3><p>The client&#8217;s existing name resolution is deliberately retained. Internal names may require split DNS or targeted resolver configuration. Switching all DNS to a home-network resolver can make public name resolution depend on the tunnel too. Actual behavior depends on the operating system, resolver, cache and other DNS settings.<\/p><h3>Does another UDP port make the gateway invisible?<\/h3><p>A different port number does not replace access control. WireGuard ignores many invalid packets, but does not guarantee complete invisibility. The protocol includes cookie replies under load, for example. Keys, firewall rules and system maintenance remain central.<\/p><\/div>\n<div class=\"lw-quellen\">\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.wireguard.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">WireGuard documentation<\/a><\/li>\n<li><a href=\"https:\/\/www.raspberrypi.com\/documentation\/computers\/os.html\" target=\"_blank\" rel=\"noopener noreferrer\">Raspberry Pi OS documentation<\/a><\/li>\n<li><a href=\"https:\/\/www.wireguard.com\/quickstart\/\" target=\"_blank\" rel=\"noopener noreferrer\">WireGuard Quick Start<\/a><\/li>\n<li><a href=\"https:\/\/git.zx2c4.com\/wireguard-tools\/about\/src\/man\/wg-quick.8\" target=\"_blank\" rel=\"noopener noreferrer\">wg-quick manual<\/a><\/li>\n<li><a href=\"https:\/\/git.zx2c4.com\/wireguard-tools\/about\/src\/man\/wg.8\" target=\"_blank\" rel=\"noopener noreferrer\">wg manual<\/a><\/li>\n<li><a href=\"https:\/\/www.wireguard.com\/protocol\/\" target=\"_blank\" rel=\"noopener noreferrer\">WireGuard protocol<\/a><\/li>\n<li><a href=\"https:\/\/netfilter.org\/projects\/nftables\/manpage.html\" target=\"_blank\" rel=\"noopener noreferrer\">nftables manual<\/a><\/li>\n<li><a href=\"https:\/\/docs.kernel.org\/networking\/ip-sysctl.html\" target=\"_blank\" rel=\"noopener noreferrer\">Linux IP sysctl<\/a><\/li>\n<li><a href=\"https:\/\/docs.kernel.org\/networking\/nf_flowtable.html\" target=\"_blank\" rel=\"noopener noreferrer\">Linux flowtables<\/a><\/li>\n<li><a href=\"https:\/\/docs.strongswan.org\/docs\/latest\/howtos\/introduction.html\" target=\"_blank\" rel=\"noopener noreferrer\">strongSwan architecture<\/a><\/li>\n<li><a href=\"https:\/\/openvpn.net\/as-docs\/v3\/openvpn-data-channel-offload\/\" target=\"_blank\" rel=\"noopener noreferrer\">OpenVPN Data Channel Offload<\/a><\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>WireGuard on Raspberry Pi with split tunneling: example configuration for access to an IPv4 home network, nftables access filters and separate checks of permitted and blocked connections.<\/p>\n","protected":false},"author":1,"featured_media":32131,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[92630],"tags":[91318,91321,91181,91219,91121,91141],"class_list":["post-533","post","type-post","status-publish","format-standard","hentry","category-tutorials-en-raspberry-pi","tag-firewall","tag-network-security","tag-raspberry-pi","tag-tutorial","tag-vpn","tag-wireguard"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway | Lukas Wojcik<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway | Lukas Wojcik\" \/>\n<meta property=\"og:description\" content=\"WireGuard on Raspberry Pi with split tunneling: example configuration for access to an IPv4 home network, nftables access filters and separate checks of permitted and blocked connections.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-07T06:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-15T11:06:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll2-533-533.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway\",\"datePublished\":\"2026-10-07T06:00:00+00:00\",\"dateModified\":\"2026-11-15T11:06:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/\"},\"wordCount\":1132,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll2-533-533.png\",\"keywords\":[\"Firewall\",\"Network Security\",\"Raspberry Pi\",\"Tutorial\",\"VPN\",\"WireGuard\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/\",\"name\":\"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway | Lukas Wojcik\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll2-533-533.png\",\"datePublished\":\"2026-10-07T06:00:00+00:00\",\"dateModified\":\"2026-11-15T11:06:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll2-533-533.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/flux-voll2-533-533.png\",\"width\":1200,\"height\":630,\"caption\":\"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/raspberry-pi\\\/tutorials-en-raspberry-pi\\\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/de\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"Lukas Wojcik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"Lukas Wojcik\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway | Lukas Wojcik","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/","og_locale":"en_US","og_type":"article","og_title":"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway | Lukas Wojcik","og_description":"WireGuard on Raspberry Pi with split tunneling: example configuration for access to an IPv4 home network, nftables access filters and separate checks of permitted and blocked connections.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-10-07T06:00:00+00:00","article_modified_time":"2026-11-15T11:06:19+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll2-533-533.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway","datePublished":"2026-10-07T06:00:00+00:00","dateModified":"2026-11-15T11:06:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/"},"wordCount":1132,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll2-533-533.png","keywords":["Firewall","Network Security","Raspberry Pi","Tutorial","VPN","WireGuard"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/","name":"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway | Lukas Wojcik","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll2-533-533.png","datePublished":"2026-10-07T06:00:00+00:00","dateModified":"2026-11-15T11:06:19+00:00","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll2-533-533.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/11\/flux-voll2-533-533.png","width":1200,"height":630,"caption":"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/raspberry-pi\/tutorials-en-raspberry-pi\/accessing-a-home-network-with-wireguard-setting-up-a-raspberry-pi-vpn-gateway\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/de\/"},{"@type":"ListItem","position":2,"name":"Accessing a Home Network with WireGuard: Setting Up a Raspberry Pi VPN Gateway"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"Lukas Wojcik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"Lukas Wojcik"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=533"}],"version-history":[{"count":8,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/533\/revisions"}],"predecessor-version":[{"id":27020,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/533\/revisions\/27020"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/32131"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}