Tag Archives: BSD

How to install ZeroTier-One VPN on OpenBSD

※ In this article, I have used OpenBSD 7.2 and ZeroTier One 1.10.6.
The most current versions for the OS and software at the time of writing.

OS Information

$ uname -a

OpenBSD openbsd.ourdare.com 7.2 GENERIC.MP#758 amd64

Install Requirements

$ sudo pkg_add wget gmake

quirks-6.42 signed on 2023-03-21T19:29:38Z
wget-1.21.3:libunistring-0.9.7: ok
wget-1.21.3:libidn2-2.3.0p0: ok
wget-1.21.3:bzip2-1.0.8p0: ok
wget-1.21.3:pcre2-10.37: ok
wget-1.21.3:libpsl-0.21.1: ok
wget-1.21.3: ok
gmake-4.3: ok

Download and Extract ZeroTier-One Source

$ wget https://github.com/zerotier/ZeroTierOne/archive/refs/tags/1.10.6.tar.gz

--2023-03-29 14:05:54--  https://github.com/zerotier/ZeroTierOne/archive/refs/tags/1.10.6.tar.gz
github.com (github.com) 해석 중... 20.200.245.247
다음으로 연결 중: github.com (github.com)|20.200.245.247|:443... 연결했습니다.
HTTP 요청을 보냈습니다. 응답 기다리는 중... 302 Found
위치: https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/refs/tags/1.10.6 [따라감]
--2023-03-29 14:05:55--  https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/refs/tags/1.10.6
codeload.github.com (codeload.github.com) 해석 중... 20.200.245.246
다음으로 연결 중: codeload.github.com (codeload.github.com)|20.200.245.246|:443... 연결했습니다.
HTTP 요청을 보냈습니다. 응답 기다리는 중... 200 OK
길이: 15259391 (15M) [application/x-gzip]
저장 위치: `1.10.6.tar.gz'

1.10.6.tar.gz	100%[======================================================================>]  14.55M  6.90MB/s    /  2.1s

2023-03-29 14:05:57 (6.90 MB/s) - `1.10.6.tar.gz' 저장함 [15259391/15259391]



$ tar xzf 1.10.6.tar.gz

Build & Install

$ cd ZeroTierOne-1.10.6



$ gmake && sudo gmake install

Register a Service

Open a new file /etc/rc.d/zerotier with an editor and fill it with the contents below and then save.

#!/bin/ksh

daemon="/usr/local/sbin/zerotier-one -d"

. /etc/rc.d/rc.subr

rc_cmd $1
$ sudo chmod u+x /etc/rc.d/zerotier



$ sudo rcctl enable zerotier



$ sudo rcctl start zerotier

zerotier(ok)

Use Commands

$ sudo zerotier-cli info
200 info ㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁ 1.10.6 ONLINE



$ sudo zerotier-cli join <networkid>