Wesley (@wesley974) header
Wesley (@wesley974) profile picture

Sharing practical OpenBSD knowledge 📚 https://nitter.gq/t.co/il6MitqjZZ ☕ https://nitter.gq/t.co/lX6513yDEj

Joined February 2010
Photo by Wesley (@wesley974)Photo by Wesley (@wesley974)Photo by Wesley (@wesley974)Photo by Wesley (@wesley974)Photo by Wesley (@wesley974)Photo by Wesley (@wesley974)Photo by Wesley (@wesley974)Photo by Wesley (@wesley974)Photo by Wesley (@wesley974)Photo by Wesley (@wesley974)
#OpenBSD 8.0 change: pkg_add(1) no longer searches the current directory by default. `pkg_add foo` now means installurl (or PKG_PATH), whatever directory you're standing in. Want a local file? Give its path. Same lesson as "." in $PATH.
1
15
645
#OpenBSD 8.0 now random-relinks smtpd(8) and httpd(8) at boot, like sshd. Every boot, every host gets its own binary layout: one leaked address no longer maps your ROP gadgets. openbsd.org/80.html# Random-relink smtpd(8) and httpd(8) at boot.
1
11
32
954
$ ls /usr/share/relink/usr/sbin/ 👉httpd smtpd sshd $ doas dmesg -s | grep reordering 👉reordering: ld.so libc libcrypto ssh-agent smtpd-ca smtpd-control smtpd-dispatcher smtpd-lka smtpd-queue smtpd-scheduler sshd-auth sshd-session httpd smtpd sshd.
1
2
227
And don’t forget to visit openbsdjumpstart.org (Single page version) Any feedback is welcome! #OpenBSD 🙏
3
7
121
#OpenBSD Jumpstart is now on 8.0 🐡 📖 Read the whole guide on a single page, or 🎞️ present it in 64 slides. Two new chapters: 🔒 HTTPS with httpd and acme-client, and 🖥️ VMs with vmm. Thanks, OpenBSD devs, for another great release ❤️ 👉openbsdjumpstart.org
15
52
1,084
Wesley retweeted
ntpd running doesn't prove the clock is synced. Check `ntpctl -s all`. Peer output includes offset, delay and jitter; an asterisk marks the peer used for sync. Verify this before comparing incident timestamps from several hosts. #OpenBSD
9
39
478
Preview package upgrades with doas pkg_add -un. It reports the planned work without installing, though PKG_CACHE may still be populated. Apply with doas pkg_add -u. Base-system fixes are handled separately by syspatch. #OpenBSD
9
30
696
ntpd running doesn't prove the clock is synced. Check `ntpctl -s all`. Peer output includes offset, delay and jitter; an asterisk marks the peer used for sync. Verify this before comparing incident timestamps from several hosts. #OpenBSD
9
39
478
Benchmark TCP without iperf: tcpbench(1) is in base. tcpbench -s on the server tcpbench -t 10 -n 4 host on the client (10s, 4 flows) -k samples live kernel TCP vars (-l lists them). Ctrl+T prints a summary mid-run. -u for UDP, -V for a routing domain. #OpenBSD
3
7
468
One binary, 20 dashboards: systat pf, states, rules, queues, ifstat, sensors, pool, malloc, uvm... Views abbreviate to the shortest unambiguous prefix, so systat io works. -s 1 to refresh every second, -b -d 10 for ten raw non-interactive samples you can pipe. #OpenBSD
1
4
9
416
Let's Encrypt without certbot: acme-client(1) is in base. ~ * * * * acme-client example.com && rcctl reload httpd The && works because exit 0 = cert CHANGED, 2 = still valid. Runs hourly, reloads only on renewal day. Test with -n first, LE bans fast. #OpenBSD
1
8
183
OpenBSD crontab(5) kills the midnight herd: ~ 3 * * * runs at a random minute within 3am, ~/30 runs twice hourly at a random offset. Flag -s prevents overlapping runs, -n mails output only on failure, -q no logging. crontab(5) #OpenBSD
2
18
404
doas.conf(5) does per-command least privilege in one line: `permit nopass :operator cmd /usr/sbin/rcctl args restart httpd` Exactly that binary, exactly those args. nopass and persist are alternatives, not a combo: no prompt to persist. And the LAST matching rule wins. #OpenBSD
3
4
269
A daemon didn't come up at boot? dmesg is the kernel buffer, it knows nothing about userland. Look at /var/log/daemon. `rcctl ls failed` = enabled but stopped `rcctl ls rogue` = disabled but running Then see why: rcctl -d start smtpd keeps stdout/stderr. rcctl(8) #OpenBSD
1
3
203
OpenBSD STAT column, the letters nobody reads: ps -axo pid,ucomm,stat p = pledged. c = chrooted. U = unveiled and locked. u = unveiled but NOT locked, which the man page flags as likely a program bug. That lowercase u is the interesting one. #OpenBSD
4
9
278
On OpenBSD, don't just check if a daemon is pledged. Check what it can still do: `ps -axo pid,ucomm,pledge` The STAT column's 'p' only tells you pledge(2) was called. This shows the promises actually left: stdio, rpath, inet... An empty column means no sandbox at all. #OpenBSD
5
12
349
Just installed OpenBSD? Read man afterboot (post-install checklist) and man hier (where everything lives, and why). Then /etc/examples/ ships commented configs for httpd, acme-client, doas, ntpd, unbound... Versioned with the system, so the syntax matches YOUR release. #OpenBSD
3
228
PF: egress is a kernel-maintained group of interfaces holding a default route. `match out on egress inet from ($lan:network) to any nat-to (egress:0)` #OpenBSD
3
7
574