@Netdewt Some more info about VNET and some hints to get that second interface to work. I assume you want this connected to the same network, just dedicated to jail traffic, correct?
VNET means your jail gets its own network stack, interfaces, addresses, routing, even firewall if desired. All virtualised. This is what you want in most cases in 2021. Specifically for services that are supposed to be available on your network independent of the NAS - like a Unifi controller.
The default setup "binds" the jail's interface to your main one. Behind the scenes TrueNAS/FreeBSD/iocage will create a bridge interface that has your physical port as one member and each jail's virtual interface as another one. Just letting the default magic work creates some problems with IPv6 and "scopes", so I try to avoid it. Most users never notice, though.
To do a proper setup in line with FreeBSD documentation we need to create the bridge interface in advance. So to use your second network port:
- go to Network --> Interfaces --> edit your second unused interface
- check "Disable Hardware Offloading"
- add "up" into the options field
- save and apply
This interface serves solely as a layer 2 connect, so it doesn't need an IP address. Without an IP address we need to tell FreeBSD to activate it - which is done implicitly with an address. Hence the "up".
Then
- again ... Interfaces, click "Add"
- add an interface of type "Bridge"
- add the physical interface as the bridge member
- save and apply
In your jail settings
- change the "auto" in vnet_default_interface to "none"
- configure IP address, netmask and default gateway
- down in the network settings set interfaces to "vnet0:<your bridge you just created>"
My setting is "bridge100" which is the bridge connected to VLAN 100 in my network ... just a name that I picked.
That should do it.
