FreeBSD bhyve

bhyve, pronounced “beehive” is a hypervisor/virtual machine manager for FreeBSD that supports most Intel and AMD processors that report the “POPCNT” (POPulation Count) processor feature in dmesg(8). Download ISO and boot it … in a new Virtual Machine … cat << 'EOF' > #!/usr/bin/env bash iso=FreeBSD-13.1-RELEASE-amd64-bootonly.iso vm=guest.img # Load Module if needed kldstat |grep vmm.ko || kldload vmm ifconfig tap0 create sysctl ifconfig ifconfig bridge0 create ifconfig bridge0 addm vmx0 addm tap0 ifconfig bridge0 create ifconfig bridge0 up # Get ISO test -f $iso || fetch https://download.

OpenBSD Compile Custom Kernel

Let’s Compile a Custom Kernel for OpenBSD … and let’s check if we can tune the Process it with multiple Processors. get Sources and prepare Custom Kernel cd /usr/src ftp$(uname -r)/sys.tar.gz tar xfz sys.tar.gz rm xfz sys.tar.gz cd /sys/arch/$(uname -m)/conf cp GENERIC.MP CUSTOM.MP config CUSTOM.MP cd ../compile/CUSTOM.MP -> with config CUSTOM.MP, you can enable disable Components which will be built into your Custom Kernel. Wlan Drives for a VirtualServer, as example, does not make sense.

Git Tags

With Tags, we have the possibility to “Tag” a certain Point as important. Just give it a release Number (v0.1, v0.2, v1.0) or whatever you like. list tags list all tags for a certain repo git tag add Tag when you’re fine with a version, add a tag … git tag -a v1.0 -m "my Version 1.0" push Tags you have to push the Tags separatly. they do not get pushed with the common “git push” command

OpenBGPD Looking Glass

BGP Looking Glass with OpenBSD something I’ve wanted to do for a long time and never got around to it … Just give a try, it’s public available: Prerequisite OpenBSD VM (at least 2G RAM) Public IPv4 / IPv6 DNS Record / Static IP Full BGP Feed (don’t worry, you can get it for free) httpd config OpenBSD got their own HTTP Daemon in Base System. Let’s enable and configure it.

Hugo Copy Button

I like Websites with the Copy Button for certain Snippets. Why not integrate into the own Blog ? Folder, Copy JS Stuff Change to Hugo Root Folder mkdir -p static/js/ cat << 'EOF' > static/js/copy-code.js (function() { 'use strict'; if(!document.queryCommandSupported('copy')) { return; } function flashCopyMessage(el, msg) { el.textContent = msg; setTimeout(function() { el.textContent = "Copy"; }, 1000); } function selectText(node) { var selection = window.getSelection(); var range = document.createRange(); range.selectNodeContents(node); selection.

Area 41

Area41 Looking Forward to the next Security Congress in Zurich . It’s sold out since a while, happy i got a early ticket :) … and all the Talks are online … sha256: 07f41198ed084963405456466b567179077366052c560295e9868a0046f0a714

OpenBSD 7.1

OpenBSD 7.1 released ! … a while ago. I upgraded all my boxes since quite a while, but i didn’t write a short post about it. There is nothing really unexpected, a stable, easy, straigh-forward development of my favourite OS, except that there is a need for more than 1G Free Disk Space in /var. That was a bit a problem for smalled Boxes like the APU with 16G Disk …


List Packages Prime [root@freebsd13 ~]# pkg prime-list bash doas fping git go gohugo gsed hping3 htop jq ... List Packages Origin [root@freebsd13 ~]# pkg prime-origins |sort archivers/py-borgbackup devel/git devel/py-pip devel/py-poetry-core editors/vim emulators/open-vm-tools ftp/wget lang/go lang/python310 net/fping ... Package Cleanup pkg autoremove Pkg Audit audit installed packages against known vulnerabilities pkg audit -F sha256: 41490d57eaf6f60005156ccf31d91c8293d7086bb6b203dc23e32d7b2c3489a6

FreeBSD - Upgrade 13.0 to 13.1

Upgrade FreeBSD 13.0 to 13.1 should be a easy task, right ? Patch it first freebsd-update fetch freebsd-update install reboot may not needed, but you have to boot anyway a few times … Fetch and Upgrade to 13.1 this needs some time ! depending on your internet speed, and specially to power and filesystem performance of your machine. 20-30min for a common VM is not unreal :( time freebsd-update upgrade -r 13.

Go CrossCompile

Crosscompile under GoLang Python is cool and everybody like it, but i also like the Concept of writing some Code, compile it for different Platforms and run it everywhere. Google’s Go Language got the possiblity to compile it for multiple Architectures and Operating Systems at the same time. Why not give a try … ? Litte Hello World package main import ( "fmt" "os" ) func main() { s := "world" if len(os.


Misc Oneliners set default branch to main git config --global init.defaultBranch main bash - check multiple files [ -f /etc/resolv.conf -a -f /etc/hosts ] && echo "Both files exist" || echo "One or Both Files are missing" remove word ’nosuid’ on the line /var in /etc/fstab sed -E -i.bak 's/(.*\/var.*)(,nosuid)(.*)/\1\3/' /etc/fstab macos show hidden files defaults write AppleShowAllFiles -boolean true; killall Finder or CMD + SHIFT + . macos hide hidden files defaults write com.

OpenBSD 7.x Diskusage

Background It seems as OpenBSD (and the installed Software) is useing more and more Space in the /usr Partition. For Upgrading to 7.1, at least 1.1 GB Free Space is needed. So, i’m gooing to update my Default Partitioning Proposal like this: Example with 25 GB root@puffy# df -h Filesystem Size Used Avail Capacity Mounted on /dev/sd0a 3.9G 766M 2.9G 20% / /dev/sd0d 1.9G 20.0K 1.8G 0% /tmp /dev/sd0e 5.8G 36.

Python PIP3

Python PIP OpenBSD 7.1 # python3 --version Python 3.9.12 # python3 -m pip --version pip 22.0.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9) List installed python3 -m pip list List Outated python3 -m pip list --outdated --format columns sha256: 6ada0942bc4d02ee477ab233571e893547049a379479b61910541e561d2f053a


settings.json Useful Settings for VSCode … settings.json { "python.linting.enabled": true, "python.linting.pylintEnabled": true, "python.formatting.provider": "black", "python.formatting.blackArgs": [ "--line-length=100" ], "python.sortImports.args": [ "--profile", "black" ], "editor.formatOnSave": false, "[python]": { "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.organizeImports": true }, }, } launch.json launch.json { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: "version": "0.2.0", "configurations": [ { "name": "Python: Test001", "type": "python", "request": "launch", // adapt this path below if needed, it assumes automation_cli is open as // root folder in your vscode workspace.

IPv6 Reverse DNS

IPv6 is fun, if you know how to handle it ! As a “sponsor LIR”, i got my own AS and a small /44 IP Space. So, as we all do “forward” DNS with our Domains, i’d like to have Reverse DNS as well. And as i don’t have a legacy IP Range, i like todo it with my v6 Space. Special thanks to Christian for his remote Hands/Tips. Appreciate it!