English
简体中文繁體中文EnglishРусскийفارسی

Home › Guides › Use your home network from outside

Use your home network from outside

Reach your home LAN from outside with WireGuard: the router or a small box as server, AllowedIPs, forwarding, firewall, port mapping and dynamic DNS.

Who receives the mail

Something at home must stay on and run WireGuard: best the router, or a Raspberry Pi or small PC. Nothing else needs installing.

Phone10.8.0.2Laptop10.8.0.3Box at home10.8.0.1LAN devices192.168.1.0/24
Phone and laptop reach the whole LAN through the box at home

AllowedIPs outside

Phone or laptop
AllowedIPs = 10.8.0.0/24, 192.168.1.0/24

The second range is your LAN. With only these two, ordinary browsing is untouched.

Forwarding at home

If the box is not the router
echo 'net.ipv4.ip_forward=1' | sudo tee /etc/sysctl.d/99-wg.conf
sudo sysctl --system
sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

Being found from outside

  1. Public IPv4Forward UDP 51820 on the router and use dynamic DNS
  2. Public IPv6 onlyAllow UDP 51820 over IPv6; outside you need IPv6 too
  3. NeitherRelay through a small VPS, see no public IP
Depending on your line
The hotel uses the same range.

Then packets go to the wrong place. Move your home to a rare range such as 192.168.87.0/24.

Only one NAS?

Write the second range as 192.168.1.10/32.

Next letterEverything through the tunnel

On the same round

Postcodes: WireGuard home network, WireGuard LAN access, reach NAS with WireGuard