Jump to content

TUN/TAP driver/device/interface?


Recommended Posts

Just to be clear from the outset, I have no real clue what the subject-line above means. I just know I need it. Allow me to elaborate...

 

I've been using an emulator called PearPC for a while now on Windoze, and its resident 'client' OS (Mac OS X panther) accesses the Web through Internet Connection Sharing and a TAP-Win32 adapter (a component of OpenVPN). I've now successfully got it running on MDK 10 OE too (with the same Mac install on a shared partition), but I'm totally unclear on how to create this type of adapter/interface on MDK.

 

The documentation I could find suggests this is a kernel module, and that if I have it, there would be a file like /dev/net/tun or /dev/tun (conflicting info everywhere, what's new?) which I don't have. My kernel is 2.6.3-15mdk, with kernel-source installed for it (though I've not had experience with building kernels or such).

 

Can anyone talk me through what TAP/TUN means, and how to implement it?

Link to comment
Share on other sites

I dunno, I'm told it's pretty easy when it works. It is beautifully easy with Windoze; as soon as the emulator is fired up, the TAP adapter connects to its (emulated) NIC and voila, the Mac can access my Windoze shares and the internet.

 

What I'm asking is, how can I determine whether my kernel has TUN/TAP support, and if not, what must I do to provide it? I'm a little scared of recompiling, but I will if that's what it takes.

Link to comment
Share on other sites

OK, I have made some headway. I installed vtun and can now 'modprobe tun' which permits the emulator to start (it chokes if there's no tun device). So there's now a working network between MDK and the Mac - both ends have static IP and the interface 'ppc' (the emulator using tun) appears in ifconfig.

 

However, the Mac cannot get DNS from my ppp0 (good ol' Speedtouch) so no internet.

 

I tried enabling Internet Connection Sharing through MCC, but it doesn't recognise ppc as an available NIC to share to.

 

So, basically I need to get under the hood. Where are the config files involved with ICS / NAT? I've only used it in Win before so need a crash-course.

 

EDIT: Pffft! (sound of me spitting coffee over monitor) - it DOES work. I apparently had the wrong IPs set in the Mac's TCP/IP settings. All working smoothly now. the PearPC emulator's installation must be getting a lot smarter, to have got this setup correct out-of-the-box.

Edited by Havin_it
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...