Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Nov 2017 07:28:37 +0200
From:      Sami Halabi <sodynet1@gmail.com>
To:        Kristof Provost <kristof@sigsegv.be>
Cc:        irukandji <irukandji@voidptr.eu>, freebsd-pf@freebsd.org
Subject:   Re: Jail isolation from internal network and host (pf, vnet (vimage),  freebsd 11.1)
Message-ID:  <CAEW%2Bogacz_K=cwwE5FpWsdiaYnWQnvKU%2B_vZN7Yh5XAygtSOFw@mail.gmail.com>
In-Reply-To: <1AEA24B8-6A9B-41E0-9109-A79A66036DBB@sigsegv.be>
References:  <1510069428.4725.31.camel@voidptr.eu> <1AEA24B8-6A9B-41E0-9109-A79A66036DBB@sigsegv.be>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
To completly isolate specific jail come to my mind the following solution:
1. use vimage.
2. setup 1 broker jail - that jail will have ipfw (or pf if but i recall it
have several bugs and kerbel panics ) with nat, will have 2 nics of 2
different epairs, one to the host and other to the isolated jail aka
'private lan'. you should nat all traffic from the nic with the isolated
jail to the world, and block access to your own networks all restrictions
you want.
3. setup your jail with the epair nic from the broker 'lan' jail.

just an idea.

Sami

=D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A 8 =D7=91=D7=A0=D7=95=D7=91=D7=B3 2017 =
04:39 PM,=E2=80=8F "Kristof Provost" <kristof@sigsegv.be> =D7=9B=D7=AA=D7=
=91:

> On 7 Nov 2017, at 23:43, irukandji via freebsd-pf wrote:
> > Hi Everyone,
> >
> > Problem: isolating jail away from internal network and host "hosting"
> > it.
> > Environment: jail with 192.168.1.100, host 192.168.1.200, VIMAGE
> > enabled kernel, VNET (vnet0:JID) over bridge interface (bridge0),
> > single network card on re0
> >
> Can you show how you=E2=80=99ve started the jail and configured the netwo=
rk setup?
> Are you running a vnet jail?
>
> > I am unable prevent jail accessing host (192.168.1.200) for any other
> > ip it is working, i have configured VNET just to have separated stack
> > but host is still accessible from jail.
> >
> What pf rules do you have?
>
> > Am I missing something or this is just something that cant be
> > accomplished using pf? I am banging my head to the wall with this issue
> > for past few months going radical lately (kernel recompile ;) )
> > but still without any result.
> >
> It should be possible to do this, but there=E2=80=99s a lot of ways to se=
t this up.
>
> Also bear in mind that VIMAGE was experimental in 11.1. There are several
> important bugs that are not fixed in 11.1 (but are fixed in CURRENT),
> especially in combination with pf.
>
> Regards,
> Kristof
> _______________________________________________
> freebsd-pf@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-pf
> To unsubscribe, send any mail to "freebsd-pf-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAEW%2Bogacz_K=cwwE5FpWsdiaYnWQnvKU%2B_vZN7Yh5XAygtSOFw>