Skip to content

JAIL_INTERFACES variable must be manually set if INTERFACE variable is changed from default #5

Description

@HackInTheBox

Please include documentation about the JAIL_INTERFACES variable
if you specify an INTERFACE, you must also specify the JAIL_INTERFACES in le-config
Here is a sample config file

JAIL_IP="192.168.4.103"
DEFAULT_GW_IP="192.168.4.1"
INTERFACE="vnet1"
JAIL_INTERFACES="vnet1:bridge0"

It is best to use a unique vnet that is currently not in use by any other jail.
If you are running a plugin currently using vnet0,
Choose a different vnet for the letsencrypt jail.

For example, change INTERFACE=vnet1 then change JAIL_INTERFACES to vnet1:bridge0

Do you need to change bridge0? Probably not. For most use-cases, you will only configure one bridge per physical network interface on your TrueNAS machine. That bridge will include each vnet, and each vnet is paired with an interface the jail uses, which is called an epair.

!!! Failure to correctly configure these interfaces will not only cause your jails to fail, but may cause excessive network traffic on your entire subnet, causing the whole network segment to fail. !!!

Unfortunately, this is not well documented in the FreeBSD docs or anywhere (I can find) on the internet at all. Remember, FreeBSD does not allow DHCP service on more than 1 interface per MACHINE. Keep this in mind when planning configuration for your jails. In my experimentation, your jails count against that quota. While DHCP "may" work for both a physical interface and a vnet simultaneously, you will likely encounter regular connection drops depending on the broadcast traffic in your network.

Also,
For POSIX consistency, please consider mounting config files in the jail's /etc folder
For POSIX consistency, please consider moving/mounting scripts in the jail's /root/bin folder (acme.sh, truenas.sh, etc)

If jail creation fails, /tmp/pkgs.json remains in freenas operating system's /tmp folder
Consider moving this to ${SCRIPTPATH}/pkgs.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions