Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2007 08:54:03 -0500
From:      =?iso-8859-1?Q?F=E9lix_Langelier?= <felix.langelier@notarius.com>
To:        <freebsd-questions@freebsd.org>
Subject:   Network Configuration with Jails.
Message-ID:  <A528456BFBC1394FB0C91228BD4BC31FD4110C@emilie.notarius.lan>

next in thread | raw e-mail | index | archive | help
Hello,

I run a FreeBSD Jailer and I want to have multiple jails in 2 seperate =
networks. The server has 2 network interfaces and each of them are =
connected in a different network. Say vlan1 and vlan2.

My problem is that all the network traffic is going through the first =
interface (vlan1). What I need is that a jail in vlan1 can't communicate =
with a jail in vlan2 (and vice-versa).

Is it possible to split the network traffic in the right interfaces and =
use a diffrent default gateway for each of them ?

Here is my /etc/rc.d configuration.

defaultrouter=3D"192.168.1.1"

static_routes=3D"vlan1 vlan2"
route_vlan1=3D"-net 192.168.1.0/24 192.168.1.1"
route_vlan2=3D"-net 192.168.2.0/24 192.168.2.1"

# vlan1 interface config.
ifconfig_bge0=3D"inet 192.168.1.10 netmask 255.255.255.0"
ifconfig_bge0_alias0=3D"192.168.1.11 netmask 255.255.255.255"

# vlan2 interface config.
ifconfig_bge1=3D"inet 192.168.2.10 netmask 255.255.255.0"
ifconfig_bge1_alias0=3D"inet 192.168.2.11 netmask 255.255.255.255"
=20
I tried to remove the default gateway but then the server was =
unreachable.
I am thinking of using pf to resolve my issue.=20

Any suggestions or ideas ?

Thanks in advance for your help.

--
Felix Langelier
Unix Sysadmin
felix.langelier@notarius.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A528456BFBC1394FB0C91228BD4BC31FD4110C>