zyclonite / zerotier-docker

ZeroTier One as Docker Image
MIT License
305 stars 74 forks source link

Router: Overriding Default Route / Full Tunnel Mode #31

Open wurst44 opened 1 month ago

wurst44 commented 1 month ago

Hi, thank you for your image and effort.

I am trying to connect to my remote network where your docker-router is running. I wanted to use the internet connection/gateway of home LAN for my clients (oversees). I saw this tutorial which seems to fit my requirement: https://zerotier.atlassian.net/wiki/spaces/SD/pages/7110693/Overriding+Default+Route+Full+Tunnel+Mode. Is this supported by your docker-router?

image

Screenshot from 2024-05-16 15-51-05

When I connect a client to my network it is not using the remote gateway when checking ifconfig.me Any ideas? Thank you!

Paraphraser commented 1 month ago

I would need to see your routing table to be sure but it sounds like you either didn't set up a managed default route in ZeroTier Central, or there is some "trick" to accepting that route on Android like there is for iOS where you have to enable the connection, then enable acceptance of the default route, then disable and re-enable the connection (very tedious).

Over on the IOTstack Wiki I wrote some documentation which might help.

Paraphraser commented 1 month ago

@wurst44 further to what I wrote before, I should probably clarify that that Atlassian tutorial you mentioned could be a bit misleading. With Docker, routing is already enabled so you don't need to do it yourself. The zerotier-router container manages all the IPtables stuff so you would not want to duplicate it. And so on. The doco I pointed you at in my earlier reply really is all that is needed. Just pick the topology that is closest to what you want to achieve and follow it.

wurst44 commented 1 month ago

Thanks for your quick response. I could not get it running. In addition I used a Win Client on a different WAN to eleminate the Android uncertainty. I also tried a plain ubuntu image and followed the zero tier instructions on routing/tunneling. No luck. Also not sure how to debug it (also with your router) . I ended up using a Socks5 proxy which works fine...