Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Dec 2019 23:56:15 +0700
From:      Victor Sudakov <vas@sibptus.ru>
To:        freebsd-net@freebsd.org
Subject:   Re: IPSec transport mode, mtu, fragmentation...
Message-ID:  <20191220165615.GA57281@admin.sibptus.ru>
In-Reply-To: <20191220160357.GB56081@admin.sibptus.ru>
References:  <20191220152314.GA55278@admin.sibptus.ru> <f38d1f3c-dc47-0776-29f9-2151b05e09b0@tuxpowered.net> <20191220160357.GB56081@admin.sibptus.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--mYCpIKhGyMATD0i+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Victor Sudakov wrote:
> Kajetan Staszkiewicz wrote:
> > On 20.12.19 16:23, Victor Sudakov wrote:
> > > Dear Colleagues,
> > >=20
> > > I've set up IPSec in transport mode between two regular FreeBSD hosts,
> > > for testing. Now TCP sessions between those hosts don't work normally
> > > any more. For example, scp is stalled almost immediately after starti=
ng
> > > a file transfer, and so is interactive ssh eventually.
> > >=20
> > > I feel that the problem is somehow related to MTU, MSS and fragmentat=
ion
> > > of ESP packets, because:
> > >=20
> > > 1. When IPSec is disabled, I can "ping -s1472 -D" the remote host all
> > > right.=20
> > >=20
> > > 2. When IPSec is enabled, the maximum packet size I've been able to s=
end
> > > through is "ping -s1414 -D". ("ping -s1415 -D host-b" already disappe=
ars
> > > in the void).
> > >=20
> > > I'm really at a loss what to do about that. In transport mode, there =
is
> > > no network interface I could adjust MTU on, or run some kind of MSS
> > > fixer.
> >=20
> > Maybe you could add route to the remote host with -mtu parameter.=20
>=20
> Just tried "route add -host host-b -mtu 1400 gw". The route is there
> with the right mtu (according to "route get host-b") but it did not
> help. Probably the packet is intercepted by IPsec before it gets into
> routing.

Sorry, Kajetan, I was mistaken, your advice with a host route *does*
work. It seems I was adding an IPv4 route but scp-ing over IPv6.

Your workaround works, I confirm.

>=20
> What gives? Setting up IPsec transport mode between hosts should be a
> simple thing which *just* *works*.
>=20
> What's the root of the problem? ESP packets cannot get fragmented or
> what?=20

I need to figure out why IPsec tunnel mode is always generating ESP
packets with the DF flag set. Therefore they just don't get through the
interface and never leave the host.

I cannot even "scrub out proto 50 no-df" them because they never go
through any f*cking interface, that's what I think is happening. Don't
tell me it's by design.


--=20
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

--mYCpIKhGyMATD0i+
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJd/P0vAAoJEA2k8lmbXsY0PmUIAIux55inxVlCqd3d82yhOnRB
xnMVeh8dtcbfUul9lYfefN1IciCCmjXEt8jmPWILuw/6edymyHt2b6RNg48M+n2d
K9k6jwkC/KcjsHsszOsJpZvlRYzFn8Rf5ExmFz3AHH3VmLBMhS7TbiG3hwxttI/u
PiUtOMC7rSP0H8cVaENAPe+gYc0P6ICz6XO4oM7YrspCrnshvo/MsejqkIdGafU8
jEQD2Nmtfyi6xTbBaAuYuZmbgi1SLP94NxP6W/UKxhFynCDqsxq/b3mcT8YxCyoQ
7u5Zux9PRCHs7PJfp+v1IxwDijWyZI2tcejgIMQG63s7zhyeeXEaWorBJ0zkZp4=
=hZdq
-----END PGP SIGNATURE-----

--mYCpIKhGyMATD0i+--



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