Code Monkey home page Code Monkey logo

bash_cli_zt's Introduction

bash_cli_zt

Status: Actively supported.

License: GMU GPL v3.0

If you want a nice GUI progrm: zeroui- https://github.com/dec0dOS/zero-ui - has a very nice interface. I have an instance running, but always default to the commandline so I continue using my bash scripts. I installed UserLand on my Pixel, installed zerotier, and my bash scripts and it worked quite well.

Here are some YouTube videos I created on using ZeroTier:

Here is a project I was working on to create a ZT controller manager for some basic tasks using Bash since I tend to use the commandline a lot.

It includes:

  1. Creating networks, autogenerating private networks or manual network selection.
  2. Listing all networks
  3. Deleting networks
  4. Peer management including listing all peers, authorized peers, and unauthorized with the option to authorize a peer.
  5. Deleting a peer from the ZT network is not possible so a hack I use is to set the peer to unathorized and set the IP to 127.0.0.100. That is only used when listing members under Peer Management so those don't display in the output.
  6. Editing ACLs using a format I created. Still needs to support more rules...I just don't use many that require it.

Requirements:

  • curl
  • jq
  • ipcalc

ipcalc is used to manage the creation of network settings, check for valid masks, etc. for the IP Pool Assignments.

jq is used to create the JSON object for most queries. I'll get around to doing it for all queries. It is mixed because as I was learning the ZT api, I used manual queries and then started using jq the more I learned how to use it.

If you receive an error that "columns" is not found, then install bsdmainutils.

Usage. You need to run this as root to access the files needed for access to your ZT Controller:

sudo bash ztnetworks.bash

Features:

  • Create networks
  • Update network description, IP assignments and manage routes
  • Edit ACLs using custom format only for IPv4
  • Manage Peers
  • Add node names and description

I teach full-time and working on my doctorate degree so will work on this as I have time. I hope it helps someone and folks contribute code.

-duane

[email protected]

bash_cli_zt's People

Contributors

learnsia avatar thedunston avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.