Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jul 2017 14:02:38 +0200
From:      "Muenz, Michael" <m.muenz@spam-fetish.org>
To:        freebsd-net@freebsd.org
Subject:   Re: NAT before IPSEC - reply packets stuck at enc0
Message-ID:  <2d607e1a-a2c0-0f85-1530-c478962a76cd@spam-fetish.org>
In-Reply-To: <911903d1-f353-d5d6-d400-d86150f88136@yandex.ru>
References:  <459d59f7-2895-8aed-d547-be46a0fbb918@spam-fetish.org> <a082662c-145e-0132-18ef-083adaa59c33@yandex.ru> <1c0de616-91ff-a6f9-d946-f098bc1a709f@spam-fetish.org> <911903d1-f353-d5d6-d400-d86150f88136@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 19.07.2017 um 12:12 schrieb Andrey V. Elsukov:
>
> Try to add the following rule:
>
> ipfw add 179 nat 1 log all from 10.24.66.0/24 to 10.26.1.1 in recv enc0
>
> This rule will pass a decrypted packet to the NAT instance, that will
> check in the states table should a packet be translated back or not.
>
> You need to have enc0 interface in UP state and sysctl variable
> net.enc.in.ipsec_filter_mask should be set to 1 or 2.
>
> After translation on the enc0 a packet will be returned to the IPsec
> subsystem, that will queue it for further processing in the netisr.
> Since destination address become foreign, it will be forwarded by IP stack.
>

Hi,

I tried this but still no luck. Packets get seen by ipfw -ta list:

00179  139    3892 Wed Jul 19 14:00:21 2017 nat 1 log ip from 
10.26.2.0/24 to 10.24.66.0/24
00179  143    4228 Wed Jul 19 14:00:21 2017 nat 2 log ip from 
10.24.66.0/24 to 10.26.1.1 in recv enc0
65535 5891 1716730 Wed Jul 19 14:00:21 2017 allow ip from any to any

But there's nothing on the internal IF. Also played around with 
filter_mask and also one_pass.
Also tried (as you see above) with a second nat instance where reverse 
is disabled.

Do you have any other clue?

Really appreciate your help, thanks!

Michael




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2d607e1a-a2c0-0f85-1530-c478962a76cd>