Reach the whole home
Put a Linux machine with ZeroTier at home as a gateway and reach the NAS, printer and camera without clients. Route, forwarding and iptables in full.
The idea
A Linux machine that is always on sits in both the home LAN and the ZeroTier network and forwards for everyone.
A route in the console
Under Managed Routes put the home subnet as the destination and the gateway's ZeroTier address as Via. The documentation advises one bit wider: for 192.168.1.0/24 write 192.168.0.0/23, so that devices at home prefer the local network.
The subnet planner works it out.
On the gateway
echo 'net.ipv4.ip_forward=1' | sudo tee /etc/sysctl.d/99-zt.conf
sudo sysctl -p /etc/sysctl.d/99-zt.confPHY=eth0; ZT=zt7nnig26
sudo iptables -t nat -A POSTROUTING -o $PHY -j MASQUERADE
sudo iptables -A FORWARD -i $PHY -o $ZT -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i $ZT -o $PHY -j ACCEPTsudo apt install iptables-persistent
sudo netfilter-persistent saveTry it
Turn off Wi-Fi on the phone and open your router's address over mobile data.
| What you see | Look at |
|---|---|
| Gateway yes, others no | Forwarding or iptables |
| Not even the gateway | Authorization or the route |
| Slower when at home | The mask is not one bit wider |
What if the router can run ZeroTier?
Better there; one hop less.
The outside network has the same subnet?
They clash. Change the one at home to something unusual.
Pages nearby
- ZeroTier default route
- zerotier-idtool initmoon
- ZeroTier setup
- create ZeroTier network
- ZeroTier virtual adapter
- ZeroTier Node ID Unknown
- ZeroTier on Synology
- ZeroTier default route Mac
- ZeroTier client
Marks: ZeroTier access home network, ZeroTier managed routes, reach NAS remotely