0% found this document useful (0 votes)
22 views1 page

Zerotier Routing

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views1 page

Zerotier Routing

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Route between ZeroTier Network and Physical Networks Armbian Server STB B860H

1. Enable IP Forwarding

[Edit /etc/sysctl.conf to uncomment net.ipv4.ip_forward.]

sysctl -w net.ipv4.ip_forward=1

2. Configure iptables

a. [Modify physical network interface name, ZeroTier interface name.]

PHY_IFACE=eth0
ZT_IFACE=zt44xaj2sx

b. [Add rules to iptables]

iptables -t nat -A POSTROUTING -o $PHY_IFACE -j MASQUERADE

iptables -A FORWARD -i $ZT_IFACE -o $PHY_IFACE -j ACCEPT

iptables -A FORWARD -i $PHY_IFACE -o $ZT_IFACE -m state --state


RELATED,ESTABLISHED -j ACCEPT

c. [Save iptables rules for next boot]

apt install iptables-persistent


bash -c iptables-save > /etc/iptables/rules.v4

You might also like