ZeroTier One VPN configuration (Legacy Firmware): Difference between revisions

From Teltonika Networks Wiki
No edit summary
m (Justas.Cip moved page ZeroTier One VPN configuration to ZeroTier One VPN configuration (Legacy Firmware) without leaving a redirect)
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
ZeroTier One is an open source software product which establishes Peer to Peer VPN (P2PVPN) connection between laptops, desktops, phones, embedded devices, cloud resources, and apps.
<b>ZeroTier One</b> is an open source software product which establishes Peer to Peer VPN (P2PVPN) connection between laptops, desktops, phones, embedded devices, cloud resources, and apps.
 
__TOC__
==Introduction==
==Introduction==


Line 25: Line 25:
     <li>Navigate to the <b>Services → VPN → Zerotier</b> page. Enable Zerotier, specify your network ID and save:<br>[[File:Zerotier_6.png|1000px]]<br>The first time Zerotier is enabled it creates a unique address for you which can take a bit of time.</li>
     <li>Navigate to the <b>Services → VPN → Zerotier</b> page. Enable Zerotier, specify your network ID and save:<br>[[File:Zerotier_6.png|1000px]]<br>The first time Zerotier is enabled it creates a unique address for you which can take a bit of time.</li>
----
----
     <li>After a minute or two your routers Zerotier address should become visible on the network options. Note: For peace of mind, you can name the connection:<br>[[File:Zerotier_7.png]]</li>
     <li>After a minute or two your routers Zerotier address should become visible on the network options. Note: For peace of mind, you can name the connection:<br>[[File:Zerotier_7.png|1000px]]</li>
----
    <li>If you have the network set to be Private, you will need to authenticate it as well to allow access to this network. You can do that from the <b>Services → CLI</b> page. Login (user: root; password: router's admin password) and type <b><i>ifconfig</i></b>. It should give you a "zt" interface with the same IP. If you see these options, it means you are connected to the Zerotier network and will be capable to reach other devices also connected there.<br>[[File:Zerotier_8.png]]</li>
----
    <li>Since both routers are configured, we can clearly see that routers have different physical IP’s and for this example we will make Router 2 with 12.12.12.12 IP (Managed IP:172.28.95.105) who will be our VPN client get the 31.31.31.31 IP (Managed IP:172.28.252.180 ) from the other Router 1
who will be our VPN server:<br>[[File:Zerotier_9.png|1000px]]</li>
----
    <li>For this we first of will need to take the VPN servers (Router1) managed IP and input it into our Managed Routes on our Zerotier network so that all connected devices which want to use the VPN service will know where our VPN server is:<br>[[File:Zerotier_10.png]]</li>
----
    <li>Save this configuration by pushing the plus sign:<br>[[File:Zerotier_11.png]]</li>
----
    <li>Login to the router, enable ZeroTier VPN and select it will be on Server mode:<br>[[File:Zerotier_12.png]]</li>
----
    <li>And for the VPN client you will need to also enable the VPN option, select the Client mode and then the network you want to have a VPN connection with if you are connected to more than one Zerotier network:<br>[[File:Zerotier_13.png|1000px]]</li>
----
----
     <li>If you have the network set to be Private, you will need to authenticate it as well to allow access to this network. You should see the same created address and a given Managed IP that you can confirm in a console or the given CLI in the System tab.
     <li>And now we can confirm client (Router 2) obtaining server IP address on a console or the CLI on the Service tab with the “curl ifconfig.co” command.<br>
Before:
<pre>root@Teltonika-RUT950:~# curl ifconfig.co
12.12.12.12
</pre>
After:
<pre>root@Teltonika-RUT950:~# curl ifconfig.co
31.31.31.31
</pre>
    </li>
</ol>
</ol>

Latest revision as of 10:10, 27 June 2024

ZeroTier One is an open source software product which establishes Peer to Peer VPN (P2PVPN) connection between laptops, desktops, phones, embedded devices, cloud resources, and apps.

Introduction

This article contains step-by-step instructions on how to set up Zerotier VPN connection using RUTxxx routers.

Prerequisites

You will need:

  • Two RUTxxx routers
  • An end device to configure the routers (PC, Laptop, Tablet, Smartphone)

Configuration

  1. Go to www.zerotier.com and register an account. After the registration you will be able to create a network in the networks tab:

  2. Your new created network should look somewhat similar to this:

    You will need to remember your Network ID and assign IP addresses that will not conflict with your current networks on your devices. You also need to decide your access control which will decide if you want to control who has access to your network (Private Network) or just allow everyone in (Public Network).

  3. Find out the public IP addresses of your routers. You can do this by visiting a website like whatsmyip.org or by using the curl ifconfig.co command via CLI or SSH.

  4. Navigate to the Services → VPN → Zerotier page. Enable Zerotier, specify your network ID and save:

    The first time Zerotier is enabled it creates a unique address for you which can take a bit of time.

  5. After a minute or two your routers Zerotier address should become visible on the network options. Note: For peace of mind, you can name the connection:

  6. If you have the network set to be Private, you will need to authenticate it as well to allow access to this network. You can do that from the Services → CLI page. Login (user: root; password: router's admin password) and type ifconfig. It should give you a "zt" interface with the same IP. If you see these options, it means you are connected to the Zerotier network and will be capable to reach other devices also connected there.

  7. Since both routers are configured, we can clearly see that routers have different physical IP’s and for this example we will make Router 2 with 12.12.12.12 IP (Managed IP:172.28.95.105) who will be our VPN client get the 31.31.31.31 IP (Managed IP:172.28.252.180 ) from the other Router 1 who will be our VPN server:

  8. For this we first of will need to take the VPN servers (Router1) managed IP and input it into our Managed Routes on our Zerotier network so that all connected devices which want to use the VPN service will know where our VPN server is:

  9. Save this configuration by pushing the plus sign:

  10. Login to the router, enable ZeroTier VPN and select it will be on Server mode:

  11. And for the VPN client you will need to also enable the VPN option, select the Client mode and then the network you want to have a VPN connection with if you are connected to more than one Zerotier network:

  12. And now we can confirm client (Router 2) obtaining server IP address on a console or the CLI on the Service tab with the “curl ifconfig.co” command.
    Before:
    root@Teltonika-RUT950:~# curl ifconfig.co
    12.12.12.12
    

    After:

    root@Teltonika-RUT950:~# curl ifconfig.co
    31.31.31.31