Zerotier Internet service

I have setup zero tier network in 3VMs(for my project use), and ping is working between systems. after that when I browse something in one VM, it uses ethernet service and not zerotier network. Why?

If you’re talking about browsing the network, the OS will generally use the default/primary network interface first so if the VMs are on the same local network that will be used before it tries the Zerotier interface.

If you want to force the connection to use the zerotier network, you’ll need to create the connections manually using the zerotier IP addresses

I want to use zerotier network such that, after the connection is established between the VMs, when i browse anything i want the VM to use the zerotier as a VPN model.

Is it possible to these functions as my inside LAN connections such as ssh, ping and all are working.

Ok sir, i have made the zerotier network as my default network,


but face the issue of no internet access.

Could you please explain that how to get the internet access with zerotier network?

Zerotier can’t be the machine’s default network since it doesn’t have internet access and by definition is a closed network.

You need to think of the zerotier network as a switch that all of the clients are attached to (in addition to their regular network). The connection isn’t between the VMs, it’s just a network that they are all connected to.

What exactly do you mean when you say “browse”?

Sir, I have a exit node concept in it(i.e. i want one node to act as exit node and i want all the nodes to send packets outside the network via this exit node). Now i want to test this exit node by making a node browse something so that if it uses the particular zerotier network, it only get out through the exit node.

I think that you need to review some routing basics to design your network architecture. It’s doable, but there’s a lot here that’s outside of the Zerotier space and more in the old school network routing side of the house. Also noting that this is not part of the design spec for Zerotier so you are going to be fighting the defaults which are based on the idea that the Zerotier network is for linking machines between each other and not for providing Internet access (which you need to have by default before being able to join a Zerotier network)

SIr,
I have tried the method in “https://zerotier.atlassian.net/wiki/spaces/SD/pages/224395274/Route+between+ZeroTier+and+Physical+Networks” but still it is not working. I want to use internet using zerotier network using it as a VPN. Please provide a solution for that.

If you wish to have ALL traffic go through ZeroTier like a traditional VPN, then it is indeed possible to do that, but that is not the default configuration. By default, ZeroTier just appears as an additional network interface to your machine(s) giving you an additional LAN to work over.

If you want all traffic over ZeroTier, you can follow this guide. Note that you need another machine to act as an Exit Node. We do not provide that for you.

Sir, Thank you for your information on Exit node concept, the internet service is currently working. Can you give the proper working of exit node and any page related to architecture of exit node in zerotier network,as, the zerotier page contains only how to connect to exit node.

You have partially overlapping routes for your physical and ZeroTier paths to anything in the 10.0.2.0/24 network. The physical path is more specific (/24 instead of the /23 through your ZeroTier network).

This is likely what you’re experiencing when you say “…it uses ethernet service and not zerotier network”

This means if you attempt to talk to 10.0.2.0-10.0.2.255, you’ll use eth0 instead of ZeroTier. You’d need to make the path over ZeroTier more specific (10.0.2.0/25 and 10.0.2.128/25) to be able to talk to those IPs using ZeroTier. An exit node won’t solve that since you already have specifics for that network.

If the exit node piece is a separate question, then here’s some generalized steps to getting it working:

  • Define a host to use as the exit node
  • Configure IP forwarding on that host (will vary by OS)
  • Configure NAT on host interface towards internet (will vary by OS)
  • In ZeroTier Central, create a default route to that node: 0.0.0.0/0 via <zerotier ip>
  • Enable default route on clients using this: zerotier-cli set <network-id> allowDefault=1

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