sudo iocage set bpf=yes dhcp=on devfs_ruleset=5 JAILNAME
https://www.justinsilver.com/random/fix-pkg-on-freenas-11-2/
Enable FreeBSD in /usr/local/etc/pkg/repos/FreeBSD.conf
iocage set bpf=yes dhcp=on devfs_ruleset=4 allow_tun=1 allow_mount_devfs=0 allow_raw_sockets=1 mount_devfs=1 vnet=on openvpn_client
iocage console openvpn_client
ifconfig create tun (set this tun in your .ovpn profile)
or rename tun (https://www.ixsystems.com/community/threads/openvpn-tun-interface-issues-in-iocage.68953/)
ifconfig tun256 name tun0
You can add some firewalling ruls with this documentation (I did not try) https://www.ixsystems.com/community/resources/fn11-2-iocage-jails-plex-tautulli-sonarr-radarr-lidarr-jackett-transmission-organizr.58/ https://www.ixsystems.com/community/threads/step-by-step-to-install-openvpn-inside-a-jail-in-freenas-11-1-u1.61681/page-6#post-472054
https://iocage.readthedocs.io/en/latest/networking.html
It can run on iocage too https://wiki.archlinux.org/index.php/ProtonVPN
Note, .ovpn from ProtonVPN are dedicated to Ubuntu profiles. up/down scripts are not in the right path. While running in iocage jail, you should use this
up /usr/local/libexec/openvpn-client.up
down /usr/local/libexec/openvpn-client.up