Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Nov 2017 09:37:52 +0100
From:      irukandji <irukandji@voidptr.eu>
To:        Goran =?UTF-8?Q?Meki=C4=87?= <meka@tilda.center>
Cc:        freebsd-pf@freebsd.org
Subject:   Re: Jail isolation from internal network and host (pf, vnet (vimage), freebsd 11.1)
Message-ID:  <1510130272.4903.8.camel@voidptr.eu>
In-Reply-To: <20171107181806.dus6nizw3n4flr73@hal9000.meka.no-ip.org>
References:  <1510069428.4725.31.camel@voidptr.eu> <20171107181806.dus6nizw3n4flr73@hal9000.meka.no-ip.org>

next in thread | previous in thread | raw e-mail | index | archive | help
The use case is to completely isolate jail from the environment for
running a honeypot, i can pf filter the traffic coming from jail
to the internal network but the freebsd server that is running the
jails (here as "host"), can be accessed from jail using its ip. I have
tried various methods of configuring jails / pf finally even
recompiling the kernel for vimage/vnet support but the problem stays.

If i execute tcpdump -i vnet0:3 i can see the traffic flowing from jail
ip to host but once i set up rule for blocking it, like:
block quick on vnet0:3 all

...it doesnt work, the traffic passes as there would be no pf. I am
missing something but i have no clue what...

Thank you.



On tor, 2017-11-07 at 19:18 +0100, Goran Mekić wrote:
> > On Tue, Nov 07, 2017 at 04:43:48PM +0100, 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
> > 
> > > > 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.
> > 
> > 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.
> > 
> > Can PLEASE someone help me out?
> > 
> > Regards,
> > irukandji
> 
> > > > > I am not sure I understand the use case. Sounds to me like you would
like to be hosting provider where bare metal machine is hosting other
people's jails, and you don't want those people being able to access
underlaying machine. Also, when you say "jail accessing host", does
that mean over SSH or something else?



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