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

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

--3uo+9/B/ebqu+fSQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 starting
> > a file transfer, and so is interactive ssh eventually.
> >=20
> > I feel that the problem is somehow related to MTU, MSS and fragmentation
> > 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 send
> > through is "ping -s1414 -D". ("ping -s1415 -D host-b" already disappears
> > 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

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.

What gives? Setting up IPsec transport mode between hosts should be a
simple thing which *just* *works*.

What's the root of the problem? ESP packets cannot get fragmented or
what?=20

> I've
> never tested this because I have interfaces (either if_ipsec of if_gif
> protected with transport mode IPSec) and I do mss clamping in pf, but
> this could work.

My goal being the creation of an IPSec protected network between several
hosts (running on X.509 certificates to enable automatic traffic
protection), configuring tunnels or additional interfaces on each host
would be unfeasible.


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

--3uo+9/B/ebqu+fSQ
Content-Type: application/pgp-signature; name="signature.asc"

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

iQEcBAEBAgAGBQJd/PDtAAoJEA2k8lmbXsY0nYEH/iyHnSBMuUfPvozZRzSnxUUc
zTC4gTq8XMWTiVmPs14kt8KfBIT7hm5YCGypYm22xcZI0W19gbkoSjFyTzO1pgQY
DmQSQVGwNFgbPYGLmzeMjYoVu0ztdgDOWYKM7WEpIgRaHXaduqXoFgHSB86FBvUm
TA3MUP3KXSWHF3V6BrD6l6sndl0wvreOLbUY0V5NaYPQhbqC83DQBNh1iP4vPdKE
SAqbm3WJNjfHxElw2BPxA1n7YIS+cGeb6frwdcSctiH6bHd+Nxr5BQXJaW3ztsdu
jWoEbgRNLeAIU0ArKZZKMbZQaNtTJqsXC6JsvGJE8NFrX65rqMLcuu7IrBnsHpM=
=t+9/
-----END PGP SIGNATURE-----

--3uo+9/B/ebqu+fSQ--



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