When overriding default gateway, all traffic times out?

I have a happily-working ZeroTier One setup with three nodes – one on an Oracle Cloud VPS running Ubuntu 20.04, and two in my home running Windows and iOS. Things like accessing the Windows shared folders when the iOS is away from home or reverse-proxying requests to the Ubuntu to the Windows work perfectly.

I’d like to route all Internet traffic from the latter two through the first, hiding my home IP from websites I visit. This is the one I’m having trouble with: whenever I enable the Default Route/Default Router Override setting on a client, all traffic to the Internet times out. I’ve clearly done something wrong or overlooked something, but I have no idea what it could be, and I’m not very knowledgeable about networking. I’d be hugely appreciative if anyone could offer any advice.

What I’ve done so far, following this guide on zerotier.atlassian.net:

  • Added net.ipv4.ip_forward=1 to /etc/sysctl.conf and run sysctl -p.
  • Added to iptables/rules.v4, before running netfilter-persistent reload, where $MY_WAN_IP is the VPS’s public static IP (result of curl ifconfig.me), is the managed route with a “(LAN)” value in the ZeroTier Central dash, and enp0s3 is the default network interface (result of route | grep '^default' | grep -o '[^ ]*$'):
-A POSTROUTING -o enp0s3 -s -j SNAT --to-source $MY_WAN_IP
-A FORWARD -i zt+ -s -d -j ACCEPT
-A FORWARD -i enp0s3 -s -d -j ACCEPT
  • Added a managed route via, the ZeroTier managed IP of the machine I want all the traffic to go through.
  • Made sure Broadcast is enabled in ZeroTier Central (it was by default).

What might I have overlooked/what should I look at next?

Thanks to anyone who can offer any tips.

1 Like

Start by creating a much smaller route in Zerotier via your VPS, eg to
If your NAT rule works then you should be able to traceroute to and see it passing out of the VPS, and you should be able to
nslookup example.com
and get a response.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.