key-networks / ztncui

ZeroTier network controller UI
GNU General Public License v3.0
1.51k stars 227 forks source link

Routes. Access to subnet fails #106

Open squromiv opened 1 year ago

squromiv commented 1 year ago

I have:

Need access to local PC from Android device through Zerotier.

1) Created virtual network in my.zerotier.com with such a config:

Details ![3](https://user-images.githubusercontent.com/15985877/223699635-95f72b4a-1d50-4957-88c4-5d19b2daeb98.png) ![4](https://user-images.githubusercontent.com/15985877/223699692-5a9738f0-bddd-42c1-b46f-4e93547e1ca2.png)

Successfully connected from Android to PC, tested traceroute in Android:

Details ![5](https://user-images.githubusercontent.com/15985877/223706284-06532b3a-79f0-4635-baed-26a247422619.png)

2) Attempt to recreate config with ztncui contoller. Rented VPS with public static IP. Ubuntu 22.04. Firewall disabled. Have launched ztncui in VPS using this method. In ztncui recreated config identical to my.zerotier.com.

Details ![6](https://user-images.githubusercontent.com/15985877/223702836-5d550dcf-1579-4fbd-83d4-ef14607608aa.png) ![11](https://user-images.githubusercontent.com/15985877/223725090-f42f2ef8-9c5c-4c71-81ad-c69c9c544055.png)

Finally, no access to subnet and traceroute from Android to PC:

Details ![8](https://user-images.githubusercontent.com/15985877/223707596-004b7cec-c909-4c36-b857-cd7182a4307a.png) ![9](https://user-images.githubusercontent.com/15985877/223707645-1cf0269b-64e3-4b1f-89d3-edb4387c0655.png)

So the same config works with zerotier central, but fails with ztncui. What is wrong? Sorry if I missed smth, I am newbie to ztncui controller.

mikkelke commented 1 year ago

I have the same issue. I tested with a Windows client and the manged route is not published in the routing table if the network is created with ZTNCUI. It is published if i create it on my.zerotier.com.

a115599663322 commented 1 year ago

I also have the same problem, the routing table created on ZTNCUI does not seem to take effect, only the default route is effective. ZT 1.10.5

noodlenoggan commented 11 months ago

Change your ZT route from 10.1.1.0/24 to 10.1.1.0/23. There's an article from ZT regarding this.

mikkelke commented 10 months ago

Change your ZT route from 10.1.1.0/24 to 10.1.1.0/23. There's an article from ZT regarding this.

This is not the problem. From the documentation "Configure the destination route as slightly larger than the actual physical subnet, here /23 instead of /24 (a smaller number is a bigger subnet in this notation) This makes devices that are on both the physical and the ZeroTier network prefer the physical connection." My devices is not on the same network, so a larger subnet should not be needed. Anyway i tested with multiple sizes of subnet and non of them works. My machine is a mix of Ubuntu and Windows and when I create the routes in ztncui the routes are not added to the routing table of the machine. If i add them with my.zerotier.com then it works fine.