As much as we at ZeroTier love Reddit, we can't keep our eyes on here 24/7. We do keep a much closer eye on our community discussion board over at https://discuss.zerotier.com. We invite you to add your questions & posts over there where our team will see it much quicker!
If you're reporting an issue with ZeroTier, our public issue tracker is over on GitHub.
Okay, so … first, you need a device that is in both networks, this could be your router at home IF it supports zerotier. Most default routers do not, so we need another device creating that connection. A raspberry pi for example, a NAS or other homeserver, all would probably do.
Since its the easiest and cheapest one, we will take a PI for this job.
What you need to is add the pi to zerotier. Then you need a route in zerotier, you can add that on the website, target would be your homenetwork/24 and the gateway would be the Zerotier IP of the pi.
That should do for the zerotier side.
Then we need to add a route on your home router, this one needs to route all traffic for the Zerotier network through the Homenetwork IP of your Pi.
Not all home routers support that. But there is an alternative if you can not set that. Its called NAT, and in this case it happens on Pi torwards your home network. It basically uses the PIs home IP address for all traffic from the zerotier network instead of the real zerotier client Ip of the device aka laptop or phone.
For that you should look up iptables MAQURADE and create a rule that does exacly that, since I am on my phone and the interface names are different most of the time I can not provide a full command here.
ADDITIONALLY, you need to allow forwarding on the Pi aswell. This is regardless if your router managed to do custom routes or not.
Usefull sources for commands and info are mostly found on guids „how to use Pi as router“ and „how to use pi as wlan accesspoint“. Also, I think I came across a video or blog post doing exactly what I just Described, if I manage to find one Tomorrow I will add that in [here]
I hope that gave you an direction and fundamentals of what you need to accomplish your goal.
PS. Bridging is NOT routing, there are zerotier guids for bridging but those merge the zerotier and physical network, what you want here is routing, and I strongly recommend routing over bridging for your usecase.
Thanks for taking the time to outline this. It's very helpful for me to get an overview of what i need to do. Youtube videos are surprisingly lacking. They either are too basic or way way over my head.
I don't have a Raspberry Pi but i have a docker container for ZeroTier on my nas. Since It's linux based I'm all thumbs with it.
I can add a static route to my home router no problem. I just don't know what to add?
I'm almost positive this is wrong but I'm not sure how to fix it. 192.168.1.x is my home network. 192.168.194.x is my opentier network.
So you want to add the static route via the zerotier web gui. At the very top of your zerotier.com config add
Destination: 192.168.1.0/24 VIA 192.168.194.117
This tells your zerotier clients “hey if you want to talk to anything in the 192.168.1.0 network you need to go to 192.168.194.117 which is your zerotier service running on your network.
Ok Got it. Does 192.168.194.117 need to be set as a bridge or anything special?
Hi there! Thanks for your post.
As much as we at ZeroTier love Reddit, we can't keep our eyes on here 24/7. We do keep a much closer eye on our community discussion board over at https://discuss.zerotier.com. We invite you to add your questions & posts over there where our team will see it much quicker!
If you're reporting an issue with ZeroTier, our public issue tracker is over on GitHub.
Thanks,
The ZeroTier Team
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
Okay, so … first, you need a device that is in both networks, this could be your router at home IF it supports zerotier. Most default routers do not, so we need another device creating that connection. A raspberry pi for example, a NAS or other homeserver, all would probably do.
Since its the easiest and cheapest one, we will take a PI for this job.
What you need to is add the pi to zerotier. Then you need a route in zerotier, you can add that on the website, target would be your homenetwork/24 and the gateway would be the Zerotier IP of the pi.
That should do for the zerotier side.
Then we need to add a route on your home router, this one needs to route all traffic for the Zerotier network through the Homenetwork IP of your Pi.
Not all home routers support that. But there is an alternative if you can not set that. Its called NAT, and in this case it happens on Pi torwards your home network. It basically uses the PIs home IP address for all traffic from the zerotier network instead of the real zerotier client Ip of the device aka laptop or phone.
For that you should look up iptables MAQURADE and create a rule that does exacly that, since I am on my phone and the interface names are different most of the time I can not provide a full command here.
ADDITIONALLY, you need to allow forwarding on the Pi aswell. This is regardless if your router managed to do custom routes or not.
Usefull sources for commands and info are mostly found on guids „how to use Pi as router“ and „how to use pi as wlan accesspoint“. Also, I think I came across a video or blog post doing exactly what I just Described, if I manage to find one Tomorrow I will add that in [here]
I hope that gave you an direction and fundamentals of what you need to accomplish your goal.
PS. Bridging is NOT routing, there are zerotier guids for bridging but those merge the zerotier and physical network, what you want here is routing, and I strongly recommend routing over bridging for your usecase.
Thanks for taking the time to outline this. It's very helpful for me to get an overview of what i need to do. Youtube videos are surprisingly lacking. They either are too basic or way way over my head.
I don't have a Raspberry Pi but i have a docker container for ZeroTier on my nas. Since It's linux based I'm all thumbs with it.
I can add a static route to my home router no problem. I just don't know what to add?
I'm almost positive this is wrong but I'm not sure how to fix it. 192.168.1.x is my home network. 192.168.194.x is my opentier network.
My Static Route: (how messed up is this?)
Name: ZeroTeir
Dest IP: 192.168.194.117 (my docker container)
IP Subnet: 255.255.255.0 Gateway IP: 192.168.1.1
thanks for your guidance.
More replies More replies
So you want to add the static route via the zerotier web gui. At the very top of your zerotier.com config add
Destination: 192.168.1.0/24 VIA 192.168.194.117
This tells your zerotier clients “hey if you want to talk to anything in the 192.168.1.0 network you need to go to 192.168.194.117 which is your zerotier service running on your network.
Ok Got it. Does 192.168.194.117 need to be set as a bridge or anything special?
More replies More replies