zerotier-systemd-manager

command module
v0.0.0-...-3f4ad0c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2021 License: BSD-3-Clause Imports: 10 Imported by: 0

README

Get ZeroTier playing nice with systemd-networkd and resolvectl

THIS REPOSITORY HAS MOVED TO this url.

This is a small tool to enable the systemd-networkd service as well as resolvectl to enable per-interface DNS settings. We take this directly from zerotier-one (on your machine) metadata. This service does not reach out to the internet on its own.

The result is per-interface DNS settings, which is especially nice when you are using zeronsd with multiple networks.

Usage

Compile it with golang:

# be outside of gopath when you do this
go get github.com/erikh/zerotier-systemd-manager

Install our slightly modified zerotier-one.service file in /usr/lib/systemd/system on Ubuntu, but this location may be different for other operating systems. This will make zerotier-one depend on systemd-networkd.

Ensure systemd-networkd is properly configured and resolvectl works as intended.

Finally, run the tool as root: zerotier-systemd-manager. If you have interfaces with DNS assignments in ZeroTier, it will populate files in /etc/systemd/network. No DNS assignment, no file.

Run systemctl restart systemd-networkd. Eventually some diffing logic will be added to determine when to kick the service, but you may just want to run it by hand when you join a network until then.

There is no detection of left networks, to avoid destroying files you care about. Remove these files manually. For better or worse, they are set up in a way that creates no interference, so as long as you don't get a similar interface name (unlikely), you're on solid ground.

Author

Erik Hollensbe github@hollensbe.org

License

BSD 3-Clause

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package service provides primitives to interact with the openapi HTTP API.
Package service provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL