Redirect all traffic from device to Zerotier


I have an raspberry (it’s connected via wifi to the router which is behind NAT) at a remote location. I have zerotier installed on it, at home on router I also have a zerotier. The network works, I can connect to raspberry ssh from the home router.

I have a device connected to the home router via wifi (e.g. phone and has a fixed IP address assigned) and I want all traffic from this device to go through the raspberry. In other words, if I check the external ip on the phone, it should display from a remote location (where raspberry is).

I suspect I need to operate on iptables. Unfortunately, I don’t know much about it, so I need your help. What should this command be?

I need to redirect traffic from to the zerotier network so that it goes through rpi in and out of the router at a remote location.

Address of the router at home -
Phone address -
Zerotier IP on the router at home -

Remote router address -
Raspberry address -
Zero address on raspberry -

Thanks for help :slight_smile:

any solution yet ? Maybe iptables is the method but how ? :smiley:

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