This is a very broad and complex topic, not something that can be easily addressed in a forum post without at least narrowing the subject down considerably.
Here is a link to get you started:
http://www.jacco2.dds.nl/networking/openswan-l2tp.html, but my honest recommendation would be to Google some of the keywords.
I would also suggest you reconsider whether this is the way to go or not. L2TP, or L2TP through IPSec are becoming outdated. An SSL based VPN might be a better option.