Bug in Knowledge Base article that needs to be fixed

I was following along with the following Knowledge Base article " Route between ZeroTier and Physical Networks" (here) and ran into a problem where it wasn’t working. After debugging for a while I noticed a typo in the iptables script. The script reads

sudo iptables -t nat -A POSTROUTING -o $PHY_IFACE -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o $ZT_IFACE -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i $ZT_IFACE -o $PHY_IFACE -j ACCEPT

but it should be

sudo iptables -t nat -A POSTROUTING -o $PHY_IFACE -j MASQUERADE
sudo iptables -A FORWARD -i $PHY_IFACE -o $ZT_IFACE -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i $ZT_IFACE -o $PHY_IFACE -j ACCEPT

Can someone update this to save other people from headaches?

Thanks!

1 Like

thanks! The article has been updated.

1 Like