« Zerotier : Configuration sur Mikrotik » : différence entre les versions

De www.yakakliker.org
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 2 : Ligne 2 :


=== Création du réseau VPN Zerotier ===
=== Création du réseau VPN Zerotier ===
* Création du réseau Zérotier, son plan d'adressage IP, sa sécurité.
<code>add name=ZT-private instance=zt1 ip-range=172.27.27.10-172.27.27.20 private=yes routes=172.27.27.0/24</code><syntaxhighlight lang="bash">
<code>add name=ZT-private instance=zt1 ip-range=172.27.27.10-172.27.27.20 private=yes routes=172.27.27.0/24</code><syntaxhighlight lang="bash">
admin@Home] /zerotier> controller/add name=ZT-private instance=zt1 ip-range=172.27.27.10-172.27.27.20 private=yes routes=172.27.27.0/24
admin@Home] /zerotier> controller/add name=ZT-private instance=zt1 ip-range=172.27.27.10-172.27.27.20 private=yes routes=172.27.27.0/24
Ligne 10 : Ligne 13 :
</syntaxhighlight>
</syntaxhighlight>


Add our new network under the interface section:
* Connexion au réseau Zérotier avec l'instance


<code>add network=879c0b5265a99e4b name=myZeroTier instance=zt1</code><syntaxhighlight lang="bash">
<code>add network=879c0b5265a99e4b name=myZeroTier instance=zt1</code><syntaxhighlight lang="bash">
Ligne 19 : Ligne 22 :
0 myZeroTier  4A:19:35:6E:00:6E  879c0b5265a99e4b  ACCESS_DENIED
0 myZeroTier  4A:19:35:6E:00:6E  879c0b5265a99e4b  ACCESS_DENIED
</syntaxhighlight>
</syntaxhighlight>
Each new peer asks for a controller to join the network, in this situation, we have ''ACCESS_DENIED'' status and we have to authorize a new peer, that is because we used the '''private=yes''' option.
Si l'option "''private=yes''" est activée, les actifs voulant se connecter au réseau Zérotier doivent être autorisés par le contrôleur.
 
Après autorisation du contrôleur <code>set N° authorized=yes</code>, l'actif demandant la connexion se verra attribué une adresse IP


After authorization, each member in the network receives information from the controller about new peers and approval they can exchange packets with them:<syntaxhighlight lang="bash">
After authorization, each member in the network receives information from the controller about new peers and approval they can exchange packets with them:<syntaxhighlight lang="bash">

Version du 23 septembre 2025 à 08:37

Configurer un Mikrotik en tant que Contrôleur

Création du réseau VPN Zerotier

  • Création du réseau Zérotier, son plan d'adressage IP, sa sécurité.

add name=ZT-private instance=zt1 ip-range=172.27.27.10-172.27.27.20 private=yes routes=172.27.27.0/24

admin@Home] /zerotier> controller/add name=ZT-private instance=zt1 ip-range=172.27.27.10-172.27.27.20 private=yes routes=172.27.27.0/24
[admin@Home] /zerotier> controller/print
Columns: INSTANCE, NAME, NETWORK, PRIVATE
# INSTANCE  NAME        NETWORK           PRIVATE
0 zt1       ZT-private  879c0b5265a99e4b  yes
  • Connexion au réseau Zérotier avec l'instance

add network=879c0b5265a99e4b name=myZeroTier instance=zt1

[admin@Home] /zerotier> interface/add network=879c0b5265a99e4b name=myZeroTier instance=zt1 
[admin@Home] /zerotier> interface/print interval=1
Columns: NAME, MAC-ADDRESS, NETWORK, STATUS
# NAME        MAC-ADDRESS        NETWORK           STATUS       
0 myZeroTier  4A:19:35:6E:00:6E  879c0b5265a99e4b  ACCESS_DENIED

Si l'option "private=yes" est activée, les actifs voulant se connecter au réseau Zérotier doivent être autorisés par le contrôleur.

Après autorisation du contrôleur set N° authorized=yes, l'actif demandant la connexion se verra attribué une adresse IP

After authorization, each member in the network receives information from the controller about new peers and approval they can exchange packets with them:

[admin@Home] /zerotier> controller/member/print
Columns: NETWORK, ZT-ADDRESS
#  NETWORK     ZT-ADDRESS
0  ZT-private  879a0b5265
[admin@Home] /zerotier> controller/member/set 0 authorized=yes

Verify newly configured IP address and route:

[admin@Home] /zerotier> /ip/address/print where interface~"Zero"
Flags: D - DYNAMIC
Columns: ADDRESS, NETWORK, INTERFACE
#   ADDRESS          NETWORK      INTERFACE 
4 D 172.27.27.15/24  172.27.27.0  myZeroTier

[admin@Home] /zerotier> /ip/route/pr where gateway~"Zero"
Flags: D - DYNAMIC; A - ACTIVE; c, y - COPY
Columns: DST-ADDRESS, GATEWAY, DISTANCE
    DST-ADDRESS     GATEWAY     DISTANCE
DAc 172.27.27.0/24  myZeroTier         0

Joindre le réseau Zerotier

add network=879c0b5265a99e4b instance=zt1 name=ZT-interface

[admin@office] /zerotier> interface/add network=879c0b5265a99e4b instance=zt1 name=ZT-interface 
[admin@office] /zerotier> interface/print interval=1
Columns: NAME, MAC-ADDRESS, NETWORK, STATUS
# NAME          MAC-ADDRESS        NETWORK           STATUS       
0 ZT-interface  4A:40:1C:38:97:BA  879c0b5265a99e4b  ACCESS_DENIED
  • Sur le contrôleur, authoriser la connexion

controller/member/set 3 authorized=yes name=Hostname

[admin@Home] /zerotier> controller/member/print
Flags: A - AUTHORIZED
Columns: NETWORK, ZT-ADDRESS, IP-ADDRESS, LAST-SEEN
#    NETWORK     ZT-ADDRESS  IP-ADDRESS    LAST-SEEN
0 A  ZT-private  879a0b5265  172.27.27.15           
1 A  ZT-private  554a914c7f  172.27.27.17           
2 A  ZT-private  a83ac6032a  172.27.27.10           
3    ZT-private  deba5dc5b1  172.27.27.13  3s348ms  
[admin@Home] /zerotier> controller/member/set 3 authorized=yes
[admin@Home] /zerotier> controller/member/print               
Flags: A - AUTHORIZED
Columns: NETWORK, ZT-ADDRESS, IP-ADDRESS, LAST-SEEN
#    NETWORK     ZT-ADDRESS  IP-ADDRESS    LAST-SEEN
0 A  ZT-private  879a0b5265  172.27.27.15           
1 A  ZT-private  554a914c7f  172.27.27.17           
2 A  ZT-private  a83ac6032a  172.27.27.10           
3 A  ZT-private  deba5dc5b1  172.27.27.13  4s55ms

Ajouter une adresse Zérotier supplémentaire à un routeur Mikrotik

  • Aussi simple qu'une adresse IP classique
    • /ip/address> add address=XXX.XXX.XXX/32 interface=Zerotier-Interface


Liens

https://help.mikrotik.com/docs/spaces/ROS/pages/83755083/ZeroTier

https://forum.mikrotik.com/viewtopic.php?t=208056


compteur web gratuit sans pub