Zerotier

From AbahDoku Wiki
Revision as of 01:32, 8 August 2023 by Akhyar (talk | contribs)

Install

curl -s https://install.zerotier.com | bash

Join Network

zerotier-cli join "network_id"

Network Controller

Versi Docker

Versi Linux server

Download bash_cli_zt.git menggunalan git clone :

git clone https://github.com/thedunston/bash_cli_zt.git
cd bash_cli_zt.git

Install curl, jq, ipcalc :

apt install curl
apt install jq
apt install ipcalc

Aktifkan zerotier-one jika belum diaktifkan :

systemctl enable zerotier-one
systemctl start zerotier-one

Pastikan Zerotier sudah aktif/running :

systemctl status zerotier-one

Jalankan file ztnetworks.bash di dalam folder bash_cli_zt.git menggunakan command bash :

bash ztnetworks.bash

akan tempil menu sebagai berikut :

################################
 ZeroTier Manager Controller   
################################
1. Create a new ZT Network on this controller
2. Delete a ZT Network on this controller
3. Peer Management
4. Edit Flow Rules for Network
5. List all networks
6. Manage Routes
7. Update Network Description
8. Update Network IP Assignment
[A]dvanced Options (edit /var/lib/zerotier/local.conf
[E]xit
Please select a numeric value:

Pilih 1, untuk membuat Network baru.

Please enter a description for the network: PUSAT_NETWORK_ZT
Would you like to autogenerate an IP range? [Y|n] or Enter to return to main menu: Y
Network created. ID: "d14dc633035688e8". (ID ini hanya contoh)
Press ENTER when done. <ENTER>
Start IP: 192.168.103.1 (IP ini hanya contoh, lain server mungkin akan beda IP)
End IP: 192.168.103.254
Network: 192.168.103.0/24
Are the above settings okay? [Y|n] Y
The network settings were enabled.  Peers can now join and will be assigned an IP address.. Press Enter to finish <ENTER>

setelah ENTER akan kembali ke Menu Zerotier Manager Controller Pilih 5 untuk melihat Network yang sudah dibuat:

Network           Description  RangeStart  RangeEnd
1) d14dc633035688e8  PUSAT NETWORK ZT  192.168.103.1  192.168.103.254
Hit Enter when done: <ENTER>

Pilih E untuk Exit dari ZeroTier Manager Controller

Koneksikan Linux Server ke Network yang sudah dibuat menggunakan CLI :

zerotier-cli join <Network_ID>
zerotier-cli join d14dc633035688e8

Periksa status koneksi:

zerotier-cli info
200 info d14dc633035688e8 1.10.2 ONLINE

Kembali ke ZeroTier Manager Controller Pilih 3. Peer Management

 Network           Description  RangeStart  RangeEnd
 1) d14dc688035633e3  RUMAH  ALBAIT  192.168.103.1  192.168.103.254
 B) To go back to the main menu

Pilih 1 :

Network ID and Name: d14dc633035688e8 PUSAT NETWORK ZT 192.168.103.1 192.168.103.254

1. List all peers 2. List all unauthorized peers 3. List only authorized peers 4. Deauthorize a peer 5. 'Delete' a peer 6. Add/Change a peer's name or description 7. 'UnDelete' a peer [Z] Back to Network Configuration

Pilih 2 melihat node yang sudah terkoneksi ke Network namun belum di atuthorized.

Selanjutnya silakan berkreasi dengan menu ZeroTier Manager Controller.

Referensi