Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Second NIC for plugin to host a webserver

Status
Not open for further replies.

Goldstrom

Neophyte
Joined
Apr 22, 2012
Messages
5
I'm having some trouble figuring out how to set up the interface for the jail on the second NIC under FreeNAS.

I'm running FreeNAS-8.2.0-BETA3-x64 (r11188) on a server with a second nic (dual port) and the second nic is connected to a separate network on a dmz. I've ended up with this:

Interface Name DHCP IPv4 Address
bge0 HomeNetwork True 10.0.2.2/24
em0 Jails True 10.0.4.2/24

my Global Config settings for FreeNAS have Gateway: 10.0.2.1 and OpenDNS servers listed.

I can shell into the plugin jail, but don't seem to have internet access from there.
[root@freenas /root]# jls
JID IP Address Hostname Path
4 10.0.4.2 software /mnt/SERVER/Jail/software
[root@freenas /root]# jexec 4 /bin/tcsh
software# pkg_add -r apache22
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.2-
release/Latest/apache22.tbz: No address record
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages
-8.2-release/Latest/apache22.tbz' by URL
software#

I'm wondering if I have to do some manual network configuration settings in FreeNAS or in the plugin jail for it to use the second network. I even tried to set up the gateway as 10.0.4.1, as I don't think I need the gateway or DNS servers at all for FreeNAS, just for the jail. That did not work.

Regards,
David
 

Goldstrom

Neophyte
Joined
Apr 22, 2012
Messages
5
Also, I do realize that the way the jails are currently set; I may have to manually change network settings to get the second nic connected to the jail and redo that change after every upgrade! Not ideal, but worth trying.
David
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm not sure you will get an answer to your issues. I know several people have asked questions related to the 8.2 betas and they've all gotten the same answer.. it's something you can play with but don't expect much support since it's still very buggy. In February someone had commented that it was tentatively scheduled for early April release.. we aren't even to a RC version yet.
 

paleoN

Neophyte Sage
Joined
Apr 22, 2012
Messages
1,403
I'm running FreeNAS-8.2.0-BETA3-x64 (r11188) on a server with a second nic (dual port) and the second nic is connected to a separate network on a dmz.
Your dual port ended up as bge0 & em0? I would have expected bge0 & bge1. From outside the jail try running the following:
Code:
ifconfig

netstat -rn
I'm wondering if I have to do some manual network configuration settings in FreeNAS or in the plugin jail for it to use the second network. I even tried to set up the gateway as 10.0.4.1, as I don't think I need the gateway or DNS servers at all for FreeNAS, just for the jail. That did not work.
The jail certainly needs DNS if not the gateway. From the documentation Network settings inside the jail, such as DNS are inherited from FreeNAS™. If you are not using DHCP, you need to make sure you specify your DNS server and default gateway in the Network -> Global Configuration section of the GUI, and select your timezone in the System -> Settings section before installing the jail plugin.

So, it shouldn't require manual configuration.

I don't have access now, but I will check my setup later.
 

ProtoSD

Dedicated Sage
Joined
Jul 1, 2011
Messages
3,353
I think the jail expects an "alias" IP to be setup for it rather than a physical network interface. You can assign the alias IP to the interface and then give the jail that ip. Unless you want to manually setup your network parameters inside the jail, something a lot of noobs aren't up to, it's better to just configure the settings in the GUI *before* setting up the PBI Jail so it will inherit the right settings.

So more or less, for your second NIC, assign the settings you want your "alias" to have inside the jail to the physical adapter in the GUI outside the jail.

I would still recommend not customizing too much with the PBI Plugin jail at this point, there are still some changes coming before the Release stage that will probably require another clean install of the jail.
 

Goldstrom

Neophyte
Joined
Apr 22, 2012
Messages
5
Good ideas... actually adding the dual port NIC gave me em0 and em1 in addition to the motherboard's bge0. I didn't mention em1 above because I'm not using it at the moment.

I think that one issue may be the way the plug-in jail "inherits settings" when it is first installed. It may be that my playing around with the settings after I've installed it won't have the intended effect.

I agree that customizing too much now could be a problem as new releases come along. I do think that it's worth trying; I'm learning more about the internal structure of FreeNAS and can write a "how too guide" in case anyone else want's to add more physical ports for their jail(s).
 

paleoN

Neophyte Sage
Joined
Apr 22, 2012
Messages
1,403
I agree that customizing too much now could be a problem as new releases come along. I do think that it's worth trying; I'm learning more about the internal structure of FreeNAS and can write a "how too guide" in case anyone else want's to add more physical ports for their jail(s).
Sounds interesting. Keep in mind BETA 4 is coming shortly, I think. I know the incorporated several jail fixes/changes in it already. You may wind up having to redo it all over again very shortly.
 
Status
Not open for further replies.
Top