No Internet from within jail

Status
Not open for further replies.

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
Hi community!
I am a noob evaluating purchasing a FreeNas Mini (I know it has the right hardware and will avoid headaches in that department).
Before committing myself to spend around $2000, I decided to get a taste of Freenas and I installed it in Virtualbox (I am running the virtual machine with 7 Gb of RAM, the maximum I could afford to give it with my computer but that is far more than videos posted by iXsystems running Virtualbox with just 2.5 Gb and doing much more than just trying to install nano in a Jail) to test it and see if it could fit what I need. My biggest reason to test it was to learn whether a sales agent from iXsystems was right when he assured Prestashop could not be installed or was mistaken (users in this forums believe that it is in fact possible because a package for FreeBSD 9 exists).
Unfortunately I am stuck with no Internet access from within a standard jail. I followed tutorials to create it, configure DHCPv4 in both FreeNas and the jail, and the only address I could ping from within the Jail is the FreeNas installation.
From the host system I could open a terminal and connect to the Jail via SSH with no problems (so DHCP is working and there is connectivity), but if I try to run a package update before attempting the installation of any application I face the following problem:

# pkg update -f
Updating FreeBSD repository catalogue...
pkg: http://pkg.FreeBSD.org/FreeBSD:9:amd64/latest/meta.txz: No address record
pkg: repository FreeBSD has no meta file, using default settings
pkg: http://pkg.FreeBSD.org/FreeBSD:9:amd64/latest/packagesite.txz: No address record
pkg: Unable to update repository FreeBSD​

After checking the contents of resolv.conf within the jail I can see my router's IP address as the nameserver (as it should be). I do have access to the Internet from FreeNas, and it can even ping resolving internet names with no problem.
I tried recreating the Jail many times to try different configurations and workarounds that I found online but I could not solve the problem.
I suspect there is something about the Jail's configuration: I am surprised I can not make it have Internet access in a new installation (I suspect this should be the default behavior since Jails exist to install software in them).
Could someone help me troubleshoot this problem? Please tell me if you need more information (and, if possible, how to get it). I have read websites that state workarounds but nothing seem to work (I even tried the solutions posted in a thread in the forums with no luck).
Thanks!
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
You might have to enable promiscuous mode on the VirtualBox NIC.
 

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
You might have to enable promiscuous mode on the VirtualBox NIC.
Thanks for the tip, but that is not the cause of the problem: the network adapter is set to "Bridged Adapter" with Promiscuous Mode set to "Allow All".
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Try to uncheck VIMAGE in the jail conf and reboot the jail.
 

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
Try to uncheck VIMAGE in the jail conf and reboot the jail.

Thanks for your reply.
The configuration in the webpage does not allow me to uncheck the VIMAGE for the Jail. Is there a way to do that through any configuration file?
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Uh?! I don't know how it's possible. What version of FreeNAS are you using just to be sure?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Thanks for your reply.
The configuration in the webpage does not allow me to uncheck the VIMAGE for the Jail. Is there a way to do that through any configuration file?
it does if you hit the 'advanced' button on the jail configuration.
 

Attachments

  • Screenshot from 2015-10-18 20-24-35.png
    Screenshot from 2015-10-18 20-24-35.png
    39.4 KB · Views: 582

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
it does if you hit the 'advanced' button on the jail configuration.
Thanks for your reply... Sorry if I wasn't clear, but I did find how to get there. The problem is that the web interface does not let me remove the check to disable VIMAGE.
I am editing this answer to give another piece of information: I was just wondering if it could be related to the browser (Firefox), so I installed Google Chrome and the problem still exists. I can unmark "autostart" but I can do nothing with VIMAGE. The Jail advanced mode looks like this:
Edit Jail.png
 
Last edited:

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Is the jail running? I'm pretty sure you can't change that setting on a running jail.
 

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
Is the jail running? I'm pretty sure you can't change that setting on a running jail.
Thanks for your response. I tried both with the Jail running and stopped, but I could not do it.
 

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
Could anyone of you please confirm that you could create a fresh jail with the defaults settings (like the ones showing in the picture I uploaded) and are actually able to unclick VIMAGE and access the Internet from within the Jail?
Thanks!
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
I can not uncheck VIMAGE (nor NAT). I tried with the jail running and not running with the same results.

I guess that should make you feel better. :)

EDIT: if I uncheck IPv4 DHCP, then I can uncheck VIMAGE.
 

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
I can not uncheck VIMAGE (nor NAT). I tried with the jail running and not running with the same results.

I guess that should make you feel better. :)

EDIT: if I uncheck IPv4 DHCP, then I can uncheck VIMAGE.

Gee, I guess you're right... until now I felt I was the only one facing this problem.
So I unchecked IPV4 DHCP and then I could uncheck VIMAGE and ping my router and access the Internet. If I restart the Jail, the old settings come back (DHCP is reactivated in the Jail) and I cannot access the Internet anymore.
Should having no way of disabling VIMAGE to gain Internet access when DHCP is active -the default setting in a fresh FreeNas install- and/or the no persistence of the settings after restarting the Jail be considered a bug?
 

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
Thanks again for checking. Are you creating a new Jail from scratch that has the defaults same settings I get when I create a Jail (like the picture posted in my previous post)?
Now it's kind of weird that depasseg and I experiencing this issue (at least the part in which we can't uncheck VIMAGE unless we first uncheck DHCP and configure the IP address manually which, BTW, I don't understand what the reason for that might be supposing it is a design choice).
 

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
Another weird behavior I found working from the web UI is that, after stopping the Jail and clicking the configure jail button, then showing the advanced mode, if I set the IP address manually, uncheck VIMAGE, save the changes (which closes the dialog) and reopen the configuration dialog, all my changes are lost: DHCP is set as the default and of course I cannot uncheck VIMAGE and access the Internet from within the Jail. Is this the expected behavior? If not, can anyone reproduce it?
Thanks again all of you for your help!
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
IIRC there's a global jail conf in the jails tab and you can select DHCP/static and e few other things so I guess if you select DHCP here it forces the jails to be in DHCP mode in the jail's conf.
 

Marcelo Ruiz

Dabbler
Joined
Oct 8, 2015
Messages
20
IIRC there's a global jail conf in the jails tab and you can select DHCP/static and e few other things so I guess if you select DHCP here it forces the jails to be in DHCP mode in the jail's conf.
Thanks again for your answer and patience.
The global configuration is set to use DHCP (actually this is the system's default), but when you change the configuration for 1 particular Jail, shouldn't it be preserved? I am thinking of configuring thing in a granular way: set general defaults but be able to override as needed...
 
Status
Not open for further replies.
Top