OpenBSD stuff - Home

Using mini PCs for home networking tasks

Part 1 - OpenBSD bridging firewall

Part 2 - OpenBSD DNS, DHCP and HTTP server

Shell Basics & Handy Commands

echo $0
echo $SHELL

which ksh

ctrl k = cut
ctrl u = cut
ctrl y = paste

File sizes and directory tree depth

d = depth

du -h -d 1 /path/to/directory | sort -hr

Let's make a USB drive

Plug in the USB flash drive

dmesg | grep ^sd

# disklabel sd2
# disklabel -E sd2

Interactive disk label session

sd2> a a          |
offset: [64]      |
size: [*]         |
FS type: [4.2BSD] |
sd2*> w           |
sd2> q            |
# disklabel sd2
# newfs sd2a
# mkdir -p /mnt/usb
# mount /dev/sd2a /mnt/usb
# umount /mnt/usb

Picture 1

shyster

Random shit

$ systat -ahN netstat

$ pkg_info -a -Q py3 | grep -i requests
$ pkg_add -s py3-requests

# tcpdump -n -e -ttt -i pflog0
# pfctl -vvsr | grep ^@
# tcpdump -l -e -n -ttt -r /var/log/pflog | grep "rule 11"

Picture 2

shyster

Author

Heikki Vuojolahti