Tunneling on RedHat and Fedora
Installing the RPM Package
- Create a repo file like
/etc/yum.repos.d/openziti.repo
matching the OS.
- Red Hat
- Fedora
- Amazon Linux
Red Hat
Architectures available:
- x86_64
Use this repo with var $releasever
on CentOS 7, Rocky 8-9, and RHEL 7-9.
[OpenZiti]
name=OpenZiti
baseurl=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat$releasever/$basearch
enabled=1
gpgcheck=0
gpgkey=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat$releasever/$basearch/repodata/repomd.xml.key
repo_gpgcheck=1
Fedora
Architectures available:
- x86_64
[OpenZiti]
name=OpenZiti
baseurl=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat9/$basearch
enabled=1
gpgcheck=0
gpgkey=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat9/$basearch/repodata/repomd.xml.key
repo_gpgcheck=1
Amazon Linux
Architectures available:
- x86_64
[OpenZiti]
name=OpenZiti
baseurl=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat8/$basearch
enabled=1
gpgcheck=0
gpgkey=https://packages.openziti.org/zitipax-openziti-rpm-stable/redhat8/$basearch/repodata/repomd.xml.key
repo_gpgcheck=1
Run
sudo yum update
to refresh the repo data cache.Run
sudo yum install ziti-edge-tunnel
to install the RPM.Enable and start the service
sudo systemctl enable --now ziti-edge-tunnel.service
Add an Identity.
The tunneller can run with zero or more identities loaded, and needs at least one to make OpenZiti services available on the host. Adding an identity means providing a JWT enrollment token which is used by the tunneller to obtain a client certificate from the OpenZiti controller. Learn more about OpenZiti Identities.
Add a Single Identity
Root and members of group
ziti
may add an identity without restarting.sudo ziti-edge-tunnel add --jwt "$(< ./in-file.jwt)" --identity myIdentityName
Load Identities Directory
The tunneller will load all enrolled identities in the
--identity-dir
directory at startup. The default location for identities is is/opt/openziti/etc/identities
. Add enrolled identity files to this directory by copying the JSON file into the directory and setting permissions for groupziti
.noteLinux package users may place enrollment tokens named
*.jwt
in this directory for automatic enrollment at next startup.Ensure the identities directory is writable by group
ziti
and not readable by others to protect the confidentiality of the identities.sudo chown -cR :ziti /opt/openziti/etc/identities
sudo chmod -cR ug=rwX,o-rwx /opt/openziti/etc/identitiesThe tunneller process needs to be restarted if the contents of
/opt/openziti/etc/identities
change.# package users can restart with systemd
sudo systemctl restart ziti-edge-tunnel.serviceConfigure the Resolver.
ziti-edge-tunnel run
provides a built-in nameserver for the services it is authorized to dial. The nameserver is automatically configured bysystemd-resolved
, if enabled.If
systemd-resolved
is not enabled, you must configure your resolver to query the tunneler's nameserver. Add Ziti's nameserver to the connection manager, e.g., NetworkManager, Netplan, or by directly editing/etc/resolv.conf
.You may configure the system resolver to use the tunneler's nameserver as the first or only nameserver.
When the tunneler nameserver is the first of multiple nameservers and the requested DNS record does not match an authorized service's intercept domain name, it sets the query status to
REFUSE
. This implies that the caller should keep trying to resolve the domain name with other nameservers.To use the tunneler nameserver as the only nameserver, you must specify an upstream nameserver for recursion:
ziti-edge-tunnel run --dns-upstream 208.67.222.222
. In this configuration, the query status from the upstream nameserver is returned, e.g.,NXDOMAIN
if the domain name is not found in the tunneler nameserver or the upstream nameserver.The IP address of the nameserver (default:
100.64.0.2
) is determined by the tunneler's dns-ip-range (default:100.64.0.1/10
).