tun with darwin/macos x

This is a discussion on tun with darwin/macos x within the OpenSSH Development forums, part of the Networking and Network Related category; hi, the following patch adds ssh tun support for Darwin/MacOS X (layer 2+3). I tested it with Darwin ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-10-2006
Reyk Floeter
 
Posts: n/a
Default tun with darwin/macos x

hi,

the following patch adds ssh tun support for Darwin/MacOS X (layer 2+3).

I tested it with Darwin 8.0.1 x86 and MacOS X 10.4 Tiger PPC, I would
like to see any tests from MacOS X users.

It requires an external tun/tap driver, see below.

reyk

--- README.platform.orig 2006-02-13 20:22:04.000000000 -0800
+++ README.platform 2006-02-13 20:21:45.000000000 -0800
@@ -30,6 +30,18 @@ gcc, gcc-mingw-core, mingw-runtime, binu
openssl-devel, zlib, minres, minires-devel.


+Darwin and MacOS X
+------------------
+Darwin does not provide a tun(4) driver required for OpenSSH-based
+virtual private networks. The BSD manpage still exists, but the driver
+has been removed in recent releases of Darwin and MacOS X.
+
+Nevertheless, tunnel support is known to work with Darwin 8 and
+MacOS X 10.4 in Point-to-Point (Layer 3) and Ethernet (Layer 2) mode
+using a third party driver. More information is available at:
+ http://www-user.rhrk.uni-kl.de/~nissler/tuntap/
+
+
Solaris
-------
If you enable BSM auditing on Solaris, you need to update audit_event(4)
--- configure.orig 2006-02-13 19:16:02.000000000 -0800
+++ configure 2006-02-13 18:28:39.000000000 -0800
@@ -5285,6 +5285,21 @@ cat >>confdefs.h <<_ACEOF
#define BIND_8_COMPAT 1
_ACEOF

+
+cat >>confdefs.h <<\_ACEOF
+#define SSH_TUN_FREEBSD 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define SSH_TUN_COMPAT_AF 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define SSH_TUN_PREPEND_AF 1
+_ACEOF
+
;;
*-*-hpux*)
# first we define all of the options common to all HP-UX releases
--- configure.ac.orig 2006-02-13 20:25:27.000000000 -0800
+++ configure.ac 2006-02-13 20:25:48.000000000 -0800
@@ -231,6 +231,11 @@ main() { if (NSVersionOfRunTimeLibrary("
AC_DEFINE(BROKEN_SETREGID)
AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1,
[Define if your resolver libs need this for getrrsetbyname])
+ AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way])
+ AC_DEFINE(SSH_TUN_COMPAT_AF, 1,
+ [Use tunnel device compatibility to OpenBSD])
+ AC_DEFINE(SSH_TUN_PREPEND_AF, 1,
+ [Prepend the address family to IP tunnel traffic])
;;
*-*-hpux*)
# first we define all of the options common to all HP-UX releases
--- openbsd-compat/port-tun.c.orig 2006-02-13 19:16:25.000000000 -0800
+++ openbsd-compat/port-tun.c 2006-02-13 18:28:46.000000000 -0800
@@ -26,6 +26,7 @@
* settings.
*
* SSH_TUN_LINUX Use the (newer) Linux tun/tap device
+ * SSH_TUN_FREEBSD Use the FreeBSD tun/tap device
* SSH_TUN_COMPAT_AF Translate the OpenBSD address family
* SSH_TUN_PREPEND_AF Prepend/remove the address family
*/
@@ -93,7 +94,10 @@ sys_tun_open(int tun, int mode)
#ifdef SSH_TUN_FREEBSD
#include <sys/socket.h>
#include <net/if.h>
+
+#if !defined(SSH_TUN_PREPEND_AF)
#include <net/if_tun.h>
+#endif

int
sys_tun_open(int tun, int mode)

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://www.mindrot.org/mailman/listi...enssh-unix-dev
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:24 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0