Skip to content

Instantly share code, notes, and snippets.

@kareiva
Last active December 2, 2025 18:41
Show Gist options
  • Select an option

  • Save kareiva/37074e3fabc311aed2c4787914d9a10a to your computer and use it in GitHub Desktop.

Select an option

Save kareiva/37074e3fabc311aed2c4787914d9a10a to your computer and use it in GitHub Desktop.
FreeBSD Podman Setup
#!/bin/sh
pkg install -y sudo podman
sysrc pf_enable=YES
sysrc linux_enable=YES
cp /usr/local/etc/containers/pf.conf.sample /etc/pf.conf
IFACE=$( netstat -rn | grep default | awk '{print $4}' )
sed -i '' -e "s/ix0/$IFACE/g" /etc/pf.conf
echo 'pf_load="YES"' >> /boot/loader.conf
echo 'net.pf.filter_local=1' >> /etc/sysctl.conf.local
sysctl net.pf.filter_local=1
kldload pf
service pf restart
service linux start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment