Repository URL to install this package:
|
Version:
0.0.3 ▾
|
| .. |
| LICENSE |
| README.md |
| SECURITY.md |
| SUPPORT.md |
Open source projects from n2x.io.
This repository contains n2xctl, a tool for managing the n2x SASE platform from the command line.
n2xctl is available for a variety of Linux platforms, macOS and Windows.
n2xctl has the same minimum requirements as Go:
See Quick Start to learn how to start building your n2x cloud-agnostic architecture.
For the complete n2x platform documentation visit n2x.io/docs.
Linux, macOS and Windows binary downloads are available from the Releases page.
You can download the pre-compiled binaries and install them with the appropriate tools.
Download the latest release.
curl -LO "https://dl.n2x.io/binaries/stable/latest/linux/amd64/n2xctl"
Validate the binary (optional).
Download the n2xctl checksum file:
curl -LO "https://dl.n2x.io/binaries/stable/latest/linux/amd64/n2xctl_checksum.sha256"
Validate the n2xctl binary against the checksum file:
sha256sum --check < n2xctl_checksum.sha256
If valid, the output must be:
n2xctl: OK
If the check fails, sha256 exits with nonzero status and prints output similar to:
n2xctl: FAILED sha256sum: WARNING: 1 computed checksum did NOT match
Install n2xctl.
sudo install -o root -g root -m 0755 n2xctl /usr/local/bin/n2xctl
Note: If you do not have root access on the target system, you can still install n2xctl to the
~/.local/bindirectory:chmod +x n2xctl mkdir -p ~/.local/bin mv ./n2xctl ~/.local/bin/n2xctl # and then append (or prepend) ~/.local/bin to $PATH
n2x provides a package repository that contains both DEB and RPM downloads.
For DEB-based platforms (e.g. Ubuntu and Debian) run the following to set up a new APT sources.list entry and install n2x-cli:
echo 'deb [trusted=yes] https://repo.n2x.io/apt/ /' | sudo tee /etc/apt/sources.list.d/n2x.list sudo apt update sudo apt install n2x-cli
For RPM-based platforms (e.g. RHEL, CentOS) use the following to create a repo file and install n2x-cli:
cat <<EOF | sudo tee /etc/yum.repos.d/n2x.repo [n2x] name=n2x repository - stable baseurl=https://repo.n2x.io/yum enabled=1 gpgcheck=0 EOF sudo yum install n2x-cli
If you are on Linux and using Homebrew package manager, you can install the n2x CLI with Homebrew.
Run the installation command:
brew install n2x-io/tap/n2x-cli
Test to ensure the version you installed is up-to-date:
n2xctl version show
Download the latest release.
Intel:
curl -LO "https://dl.n2x.io/binaries/stable/latest/darwin/amd64/n2xctl"
Apple Silicon:
curl -LO "https://dl.n2x.io/binaries/stable/latest/darwin/arm64/n2xctl"
Validate the binary (optional).
Download the n2xctl checksum file:
Intel:
curl -LO "https://dl.n2x.io/binaries/stable/latest/darwin/amd64/n2xctl_checksum.sha256"
Apple Silicon:
curl -LO "https://dl.n2x.io/binaries/stable/latest/darwin/arm64/n2xctl_checksum.sha256"
Validate the n2xctl binary against the checksum file:
shasum --algorithm 256 --check n2xctl_checksum.sha256
If valid, the output must be:
n2xctl: OK
If the check fails, sha256 exits with nonzero status and prints output similar to:
n2xctl: FAILED sha256sum: WARNING: 1 computed checksum did NOT match
Make the n2xctl binary executable.
chmod +x n2xctl
Move the n2xctl binary to a file location on your system PATH.
sudo mkdir -p /usr/local/bin sudo mv n2xctl /usr/local/bin/n2xctl sudo chown root: /usr/local/bin/n2xctl
Note: Make sure
/usr/local/binis in yourPATHenvironment variable.
If you are on macOS and using Homebrew package manager, you can install the n2x CLI with Homebrew.
Run the installation command:
brew install n2x-io/tap/n2x-cli
Test to ensure the version you installed is up-to-date:
n2xctl version show
Open the Command Prompt as Administrator and create a folder for n2x.
mkdir 'C:\Program Files\n2x'
Download the latest release into the n2x folder.
curl -LO "https://dl.n2x.io/binaries/stable/latest/windows/amd64/n2xctl.exe"
Validate the binary (optional).
Download the n2xctl.exe checksum file:
curl -LO "https://dl.n2x.io/binaries/stable/latest/windows/amd64/n2xctl.exe_checksum.sha256"
Validate the n2xctl.exe binary against the checksum file:
Using Command Prompt to manually compare CertUtil's output to the checksum file downloaded:
CertUtil -hashfile n2xctl.exe SHA256 type n2xctl.exe_checksum.sha256
Using PowerShell to automate the verification using the -eq operator to get a True or False result:
$($(CertUtil -hashfile n2xctl.exe SHA256)[1] -replace " ", "") -eq $(type n2xctl.exe_checksum.sha256).split(" ")[0]
Append or prepend the folder C:\Program Files\n2x to your PATH environment variable.
Test to ensure the version of n2xctl is the same as downloaded.
n2xctl version show
All artifacts are checksummed and the checksum file is signed with cosign.
Download the files you want and the checksums.txt, checksum.txt.pem and checksums.txt.sig files from the Releases page:
Verify the signature:
cosign verify-blob \ --cert checksums.txt.pem \ --signature checksums.txt.sig \ checksums.txt
If the signature is valid, you can then verify the SHA256 sums match the downloaded binary:
sha256sum --ignore-missing -c checksums.txt
Our Docker images are signed with cosign.
Verify the signatures:
COSIGN_EXPERIMENTAL=1 cosign verify ghcr.io/n2x-io/n2xctl
The first time you run n2xctl, you will be assisted to generate your n2xctl.yml. This config file will be located by default at the $HOME/.n2x directory.
See the n2xctl configuration reference to find all the configuration options.
See usage with:
n2xctl help
You can also run n2xctl as a Docker container. See the example below.
Registries:
ghcr.io/n2x-io/n2xctln2xdev/n2xctlExample usage:
docker run --rm -ti -v $HOME/.n2x:/root/.n2x:ro ghcr.io/n2x-io/n2xctl help
Have questions, need support and or just want to talk?
Get in touch with the n2x community!
Participation in the n2x community is governed by the Contributor Covenant Code of Conduct. Please make sure to read and observe this document.
Please make sure to read and observe this document. By participating, you are expected to uphold this code.
The n2x open source projects are licensed under the Apache 2.0 License.