Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Aug 2012 10:00:31 -0700
From:      YongHyeon PYUN <pyunyh@gmail.com>
To:        George Mamalakis <mamalos@eng.auth.gr>
Cc:        stable@freebsd.org
Subject:   Re: pf nat fails on msk0 from packets deriving from a jail interface
Message-ID:  <20120809170031.GB3019@michelle.cdnetworks.com>
In-Reply-To: <50224E85.2040707@eng.auth.gr>
References:  <50224E85.2040707@eng.auth.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 08, 2012 at 02:33:25PM +0300, George Mamalakis wrote:
> Hi all,
> 
> Suddenly I am facing a problem on a new PC, using a configuration that I 
> have been using on more than 10 servers for the last few years. The only 
> thing that I find that differs from my other configuratinos is the NIC 
> of the PC. If not, I must be missing something very trivial.
> 
> I have built a jail on this PC, following the handbook's guidelines 
> (section: application of jails). The PC has one NIC, msk0, where I run 
> pf on (built on my kernel; I have already tried using the module). My 
> pf.conf is as simple as possible:
> 
> # cat  /etc/pf.conf
> 
> nat on msk0 from any to any -> 10.0.3.6
> pass quick all
> 
> when I jexec inside the jail, and pf is running, I am unable to reach 
> any machine except my jail (not even the host). If pf is off, the 
> network works just fine (of course my router knows where to find my 
> jail's subnet).
> 
> What is strange is that if I tcpdump on msk0, then after a few seconds 
> that I request something from within the jail, I see the packets going 
> and coming on msk0 using the correct IP (the NAT IP), but it seems that 
> the machine fails to route them back inside the jail.

I guess this is the same issue reported in kern/170081.
Some msk(4) controllers lack full hardware checksum offloading
capability such that pseudo checksum should be computed by upper
layer. It seems pf(4) NAT was broken for controllers that lack
pseudo checksumming. This indicates the following ethernet
controller do not work with pf(4) NAT.
sk(4), msk(4), fxp(4), hme(4) and gem(4)

Try disabling RX checksum offloading as a work-around.
#ifconfig msk0 -rxcsum



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