Extra Network Card in a Jail ?

Hello together,

We try to build a FreeBSD Server with jails. Our server has 2 network cards (one for the internal link and the second is an external link to the DMZ). So we want to use the external NIC (em1) directly in a jail with a public IP. The em0 for the Internal link is for the host itself.

So how does it work? Should I add the em1 on the host via rc.conf and route it to the jail ? :\ Or can I add the em1 directly in a jail (best solution in my eyes, no route needed)?

Most of the How-Tos around here describe a virtual NIC in a jail, which makes no sense for us because we have an extra NIC for the jail only (linked to the DMZ).

Thanks for any help ;)

Kind Regards.
 
You don't need to do anything with em1, just bind the jail to that interface.
 
Cool, thanks for you answer. But which way it goes ?

If done it now like this:
Host´s rc.conf
Code:
...
...
# JAIL
jail_interface="em1"
...

Jail's rc.conf
Code:
defaultrouter="93.XXX.YYY.ZZZ"
ifconfig_em1="inet 93.XXX.YYY.ZZZ netmask 255.255.255.240"

But I'm unable to ping my gateway or any other IP. Netmask and defaultrouter are correct.
 
You can't set an IP address or a route inside a regular jail. Jail_interface isn't correct either.

Look in /etc/default/rc.conf and the jail(8) man pages for examples.
 
Back
Top