From owner-freebsd-net  Mon Oct 21  1:33:26 2002
Delivered-To: freebsd-net@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A9BCE37B401
	for <freebsd-net@freebsd.org>; Mon, 21 Oct 2002 01:33:25 -0700 (PDT)
Received: from gvr.gvr.org (gvr.gvr.org [212.61.40.17])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CD18343E65
	for <freebsd-net@freebsd.org>; Mon, 21 Oct 2002 01:33:24 -0700 (PDT)
	(envelope-from guido@gvr.org)
Received: by gvr.gvr.org (Postfix, from userid 657)
	id 81EE897; Mon, 21 Oct 2002 10:33:23 +0200 (CEST)
Date: Mon, 21 Oct 2002 10:33:23 +0200
From: Guido van Rooij <guido@gvr.org>
To: Lars Eggert <larse@ISI.EDU>
Cc: Charles Henrich <henrich@sigbus.com>, freebsd-net@freebsd.org
Subject: Re: IPSEC/NAT issues
Message-ID: <20021021083323.GA27359@gvr.gvr.org>
References: <20021017162243.B89519@sigbus.com> <3DAF509C.6030002@isi.edu> <20021017172905.A91625@sigbus.com> <3DAF5C21.6000108@isi.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3DAF5C21.6000108@isi.edu>
Sender: owner-freebsd-net@FreeBSD.ORG
Precedence: bulk
List-ID: <freebsd-net.FreeBSD.ORG>
List-Archive: <http://docs.freebsd.org/mail/> (Web Archive)
List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions)
List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-net>
List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-net>
X-Loop: FreeBSD.org

On Thu, Oct 17, 2002 at 05:56:01PM -0700, Lars Eggert wrote:
> 
> Your packets don't seem to reach natd after IPsec inbound processing.
> 
> Looks like ipfw processing happens before IPsec (so natd sees the 
> IPsec'ed packets, but doesn't know anything about them), and gets thems 
> them after IPsec inbound processing. What you want is a way to do IPsec 
> first, and then ipfw processing, but I don't know if that can be done.
> 
> Try configuring an IPIP tunnel between B and C, and transport-mode IPsec 
> that. That way, your NAT packets get tunneled, and the tunneled packets 
> secured. On inbound, security processing comes first, then 
> decapsulation, then ipfw.

Only with the following patch:

  http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/ip_input.c.diff?r1=1.213&r2=1.214

-Guido

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message