I have configured two Linux boxes so they automatically use a transport-level IPSec connection whenever they need to communicate. The configuration is based on Racoon with X509 authentication and the bundle_complex
option set to on
, as well as policies that require both ESP and AH between the two boxes.
While the configuration works, generally speaking, the first few packets are always lost, e.g.:
$ ping -c 3 A.B.C.D
PING A.B.C.D (A.B.C.D) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
64 bytes from A.B.C.D: icmp_req=3 ttl=64 time=0.497 ms
Is there any way to prevent this, for example by "delaying" the packets until the IPSec transport has been negotiated?