This repository provides a framework for automatically configuring a FreeBSD instance provisioned on Hetzner Cloud as an IPv6 VNET jail server.
This assumes that the base FreeBSD instance has been configured using the hcloud-freebsd tool and provides a userdata.sh script that bootstraps the configuration.
The rough sequence of events is:
-
User provisions instance either using the web interface or hcloud cli utility with the userdata.sh script - ie:
hcloud server create-image --location ${LOCATION} --type ${TYPE} --image ${IMAGE} --name ${NAME} --ssh-key ${SSHKEY} --user-data-from-file ./userdata.sh
-
The
hcloud
utility configures the server and runs the userdata.sh script -
The userdata.sh installs the
git-lite
package and uses this to clone this repository into a temporary directory -
From the temporary directory userdata.sh sources some utility functions from utils.sh and then sources the main installation script run.sh
-
The run.sh script can be confiigured as needed. Files needed for installation are in the files directory and can then be installed to the host using the
install
utility (or other). -
For this example it configures the server as a jail host with:
- ZFS filesystem for jails (
/jail
) - v6jail setup
- NAT64 running on host (via IPFW) to allow IPv4 connectivity from jails
- ZFS filesystem for jails (