Reaching two NICs from inside a Jail

Status
Not open for further replies.

_Shin_

Dabbler
Joined
Aug 2, 2014
Messages
25
Hi,
I am trying to install zoneminder in order to monitor some surveillance IP cameras .

The cameras are connected to two LAN, my Freenas box is connected to both.

My plan was to run a lubuntu virtualbox jail for it, since I am not able to install it inside a standard FreeBSD jail.

The problem is that from inside the jail I can only use the first network card, hence I can only reach one LAN.

Is there a way for me to reach both LAN from inside the Jail?
The Virtualbox is at the moment configured with one bridged network interface in the 192.168.0.0/24 LAN.

I need to reach also the other 192.168.1.0/24 LAN.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I don't *think* you can do what you are wanting easily. You could probably mess with the routing tables and get it to do what you want. But to be honest, I'd be more than a little hesitant to do that. It could really backfire.

Any reason you aren't just putting them all on the same LAN? That seems like the obvious and simple answer.
 

_Shin_

Dabbler
Joined
Aug 2, 2014
Messages
25
Where I live I have two different LAN and two different Internet connections.
My idea was to keep the two networks separated, but sharing the NAS with both.

I am having a big headache trying to resolve this problem.
Furthermore, I just realized that the Plex Media Server is in the same situation, only allowed to communicate with one LAN at the time.

I googled hard for the last three hours, and it seems like the two only options I have are:

- use a dual WAN router and failover/load balance the two WAN into a single LAN
or
- use a normal router to "join" the two networks

It is a shame that in both cases I won't be able to make the most of my second NIC.

Can you suggest any other options ?

Thank you.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Nope, those two options were basically what I was considering.
 

_Shin_

Dabbler
Joined
Aug 2, 2014
Messages
25
I think I will go for the second option.

The load balancing is tempting but I fear that it will give me a lot more headaches in the future.

Anyway, it is a pity that at the moment is not possible to bridge two NIC into a Jail.
I hope that this feature will be developed soon.

Thank you for your support.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I don't know if you can use the second NIC but you could try using different subnet masks. Lets say LAN 1 is = 192.168.1.0-191 and LAN 2 is - 192.168.1.192-255. You would setup your internet routers for those settings. I guess you could setup the FreeNAS NICs to the two different IP address ranges. To be honest, I haven't done this type of thing in a while. And for your devices on your network, use the 255.255.255.0 subnet mask if you want to access both networks.

EDIT: Also look into third party Router software, they are typically free and have a ton of comercial type features which may help you out. DD-WRT is an example.
 

_Shin_

Dabbler
Joined
Aug 2, 2014
Messages
25
I guess you could setup the FreeNAS NICs to the two different IP address ranges.

Could you please clarify this point?
I don't think I get it.
 

_Shin_

Dabbler
Joined
Aug 2, 2014
Messages
25
Third option: 1 LAN, 1 subnet, 2 gateways (the two ADSL modem/routers).

I will manually specify which IP uses which gateway, and have only 1 DHCP server to manage the guests. I'll try this one.

Whish me luck!
 
Status
Not open for further replies.
Top