I’ve recently been tasked on implementing a linux vpn client for our IPSEC/L2TP based vpn. This task would have been extremely difficult if not for the efforts of Jacco de Leeuw (for his “Using Linux as an L2TP/IPsec VPN client” documentation) and Scott Myron et al. from Indiana University (“Linux L2TP over IPsec VPN Script for IU”).
The Debian ipsec-tools package doesn’t work properly with the Debian 2.4.21 kernel (you can’t specify “ipsec” as policy, it only recognises “discard” and “none”). Herbert Xu helped me out and I’ve rebuild the packages against the 2.4.21 kernel sources, and now it seems to work ok. I’ve made the packages available here.