Trouble setting up networking

Status
Not open for further replies.
Joined
Dec 23, 2014
Messages
6
Hi

I have a FreeNAS running 11.2, but it was a 9.10 upgraded to 11.1 and then to 11.2. I still have jails running from 9.10 (yeah, I know, should have prioritized having them migrated before)

My problem is, I want to create new jails to replace the old ones. But I want to do it one jail at a time. All my jails are configured with static IPv4. Currently the jails I have include:
* Plex Mediaserver
* OpenVPN Proxy server
* SSH server
* Apache/MySQL
* DNS Server (dnsmasq)

I have been able to create a new ssh jail and got networking working with bridge1 interface and static IP.

My problem is that (from what I understand), the "preferred" networking should include VNET, however I am not able to create new jail with VNET enabled and a static IP. No matter what I do, then I cannot get an interface up on the jail, thus no network connectivity.

Anyone that can help with a guidance to configuring new jails that can support the features I need with Static IP? I really dont think the guide is of much help... it quickly goes very technical without any guidance to which options should be checked.

I do have DHCP on my network, and I also tried to create a jail with dhcp enabled.. this does not come online due to timeout on dhcp requests. But since my dhcp server (router/firewall) are not able to predefined IP addresses for MAC adresses, then I do not want to use DHCP for my jails. They are required to have static IP addresses.

Hope that someone can help.

Thomas
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
This thread presents the jail creation syntax for the command line that you're looking for.
iocage create -n "jailname" -r 11.2-RELEASE ip4_addr="vnet0|<IP ADDRESS HERE>/24" defaultrouter="<ROUTER IP HERE>" vnet="on" allow_raw_sockets="1" boot="on

As an example:
iocage create -n plex -r 11.2-RELEASE ip4_addr="vnet0|192.168.0.30/24" defaultrouter="192.168.0.1" vnet="on" allow_raw_sockets="1" boot="on

I'm sure there's a way to do this from the FreeNAS web interface, but I'm not familiar enough with it to provide any advice. One issue that was present in 11.1-U6 with this approach was that after restarting the freenas host, the physical interface wouldn't get added to the bridge. I fixed this with an init task to run the command ifconfig bridge0 addm igb0, where igb0 is the interface for my physical NIC. From what I've read, this shouldn't be necessary in 11.2-U1, but I haven't tested it.
 
Joined
Dec 23, 2014
Messages
6
Great... it worked like a charm... and easy to wrap it into a script so creating jails are as easy as running the script with two arguments...

Thomas
 
Status
Not open for further replies.
Top