Up until now I have been using a FreeBSD box as an ipsec gateway. But I wanted to change this to be a Linux box.
The problem is that the other end of the ipsec tunnel is a FreeBSD box, using the usual esp/tunnel + gif interface to create the tunnel.
After a long time, probably too much time, read/searching the web and always getting the answer that FreeS/WAN does not support this, I thought what the heck, lets play.
So I just played with every command I could think of and finally I got it to work. All I needed todo was change the routing table in a way that the route command could not do, but iproute2 could.
So now I am happy again.