You're quite welcome to have the code that I've written, I'm planning to release it on sourceforge anyway
I haven't got any dns stuff working with the tunnel thing yet, it shouldn't be too hard though, at the moment it just sets up the tunnels and the routes
I've got a tunnel setup to APE6 at the moment, but I'm having some problems routing traffic across it and haven't had a chance to look at it properly