Did a quick google search and many links on tun but not sure if can help. Not much time to read through them. Here is one that describes tun.
http://vtun.sourceforge.net/
There are also post on tun here. Check through them, maybe one mentions it or points to some links.
Brian