ZeroTier on OpenWRT - Networking advice

Is there anything in /var/lib/zerotier-one, /etc/zerotier, or /etc/zerotier-one? You’re mostly looking for the networks.d folder.

I did. Basically, /var/lib/zerotier-one/networks.d/.local.conf

Has the following:
allowManaged=1
allowGlobal=0
allowDefault=0

If I replace allowDefault to 1 and restart zerotier service, it never comes up again.

Though to move the folders across, following the doc:

mkdir /etc/zerotier
cp -r /var/lib/zerotier-one/* /etc/zerotier/
uci set zerotier.sample_config.config_path='/etc/zerotier'
uci set zerotier.sample_config.copy_config_path='1'
uci commit zerotier
service zerotier restart

But If I try to perfom a
uci set zerotier.sample_config.allowDefault='1'
The file that gets changed, is still on /var/lib/zerotier-one instead of /etc/zerotier

Can you manually modify the <networkid>.local.conf manually with vi or something?

Yes, but even after manually changing the allowDefault to 1 and then restart zerotier, it never starts back

Sorry, yeah saw that after rereading it.

There may be a way to get this working, but I would honestly just create 2 static routes for these routes, with a next-hop of your remote ZT node:
0.0.0.0/1
128.0.0.0/1

This will do what you’re hoping for ZeroTier to do.

After replacing allowdefault to 1, and restarting zerotier service.
zerotier-cli info (or any other args) returns:
200 info ef084d4bee OFFLINE 1.1.14

For a while.

But as soon as it must get online, it just fails with:
0 info connection failed

and everything stops working

Could you elaborate on how to manually create those routes?
Sorry, very new to this.
Thanks for all the help so far!

EDIT:
If you meant by zerotier central. I tried the following:


Where 172.23.100.214 is the ip address of the router.
But it is giving me that warning : "Not private IP space. Clients will need to set Allow Global

Nothing change on route -n as well

No I meant in OpenWRT.

You can start with these, they are just runtime commands that will put the routes in the routing table, but they won’t be persistent.

ip route add 0.0.0.0/1 via zt_gateway_ip
ip route add 128.0.0.0/1 via zt_gateway_ip

Use ip route show or route -n to see the routing table afterwards.

If those work, you can remove them with this:

ip route del 0.0.0.0/1 via zt_gateway_ip
ip route del 128.0.0.0/1 via zt_gateway_ip

Then add them using uci:

uci add network route
uci set network.@route[-1].interface='zt1' # Replace 'zt1' with the ZeroTier interface
uci set network.@route[-1].target='0.0.0.0'
uci set network.@route[-1].netmask='128.0.0.0'
uci set network.@route[-1].gateway='your_gateway_ip' # Replace 'your_gateway_ip' with the gateway ZeroTier IP

uci add network route
uci set network.@route[-1].interface='zt1' # Replace 'zt1' with the ZeroTier interface
uci set network.@route[-1].target='128.0.0.0'
uci set network.@route[-1].netmask='128.0.0.0'
uci set network.@route[-1].gateway='your_gateway_ip' # Replace 'your_gateway_ip' with the gateway ZeroTier IP

uci commit network

/etc/init.d/network restart

I should also add you’re going to need a return route for the subnet that TV is on unless you NAT from the OpenWRT router at your parents house.

Another note if you like OpenWRT and are open to spending a little bit of money, you can look into Gl.iNet routers, which are inexpensive but feature rich little OpenWRT routers.

I wasn’t sure if zt_gateway_ip, is where I have the zerotier working as a full tunnel on my home server or the ip address of the router.

So I tried both (one at a time)

ip route add 0.0.0.0/1 via 172.23.100.214
ip route add 128.0.0.0/1 via 172.23.100.214

then

ip route add 0.0.0.0/1 via 172.23.154.239
ip route add 128.0.0.0/1 via 172.23.154.239

172.23.100.214 is the ip address assigned to the router, and 172.23.154.239 the one on my local server.

Neither worked. I still can’t ping a service runnign on my local server at 192.168.1.132

The gateway will be the ZT node at your house. You’ll also need a return route for the LAN at your parents house. You can do that in ZeroTier Central. Just set the route with a next-hop of the OpenWRT’s ZeroTier IP. You may also need to look at the OpenWRT Firewall.

Or you can configure NAT on the OpenWRT router.

Would you be so kind of explaining how I should create the return role on zero tier central?
0.0.0.0/0 via 172.23.100.214?

Yeah, no problem! What is the LAN IP at your parents house? That is what you’ll be creating:

<parents LAN Subnet> via 172.23.100.214

If both subnets are 192.168.1.0/24, you’ll need to do more specific subnets. So if the IP of the TV were 192.168.1.50, you’d have:

192.168.1.50/32 via 172.23.100.214

Yes, both are 192.168.1.1.
How can I find out the subnet of the TV?

Assuming the TV is getting its IP via DHCP, you can look at this on the OpenWRT router:

cat /tmp/dhcp.leases

hm, it seems no such file exists

I sent you a direct message.

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