$ ifconfig ipsec0 create reqid 987$ ifconfig ipsec0 inet tunnel 192.168.222.3 192.168.223.5
$ setkey -DP0.0.0.0/0[any] 0.0.0.0/0[any] any in ipsec esp/tunnel/192.168.223.5-192.168.222.3/unique:987 spid=452 seq=3 pid=4853 scope=ifnet ifname=ipsec0 refcnt=1::/0[any] ::/0[any] any in ipsec esp/tunnel/192.168.223.5-192.168.222.3/unique:987 spid=454 seq=2 pid=4853 scope=ifnet ifname=ipsec0 refcnt=10.0.0.0/0[any] 0.0.0.0/0[any] any out ipsec esp/tunnel/192.168.222.3-192.168.223.5/unique:987 spid=453 seq=1 pid=4853 scope=ifnet ifname=ipsec0 refcnt=1::/0[any] ::/0[any] any out ipsec esp/tunnel/192.168.222.3-192.168.223.5/unique:987 spid=455 seq=0 pid=4853 scope=ifnet ifname=ipsec0 refcnt=1
In order to pass traffic over an IPsec tunnel, we need a policy matching the traffic. By default when adding a phase 2 (or child) policy a “kernel route” is installed as well, which traps traffic before normal routing takes place.
I am just trying to shed a little more light on it and do a few more tests with IPsec policies before I start with DTrace.But I am a little bit surprised that apparently no one has observed this behavior in themselves. Am I really the only one?