diff -urN stunnel-4.39-0009/src/client.c stunnel-4.39-0010/src/client.c
--- stunnel-4.39-0009/src/client.c	2011-07-21 12:07:40.503311991 +0200
+++ stunnel-4.39-0010/src/client.c	2011-07-21 13:36:13.001103845 +0200
@@ -1219,8 +1219,10 @@
 #elif defined(IP_TRANSPARENT)
     /* non-local bind on Linux */
     if(c->opt->option.transparent_src) {
-        if(setsockopt(c->fd, SOL_IP, IP_TRANSPARENT, &on, sizeof on))
+        if(setsockopt(c->fd, SOL_IP, IP_TRANSPARENT, &on, sizeof on) != 0 ||
+           setsockopt(c->fd, SOL_IP, IP_FREEBIND, &on, sizeof on) != 0 )
             sockerror("setsockopt IP_TRANSPARENT");
+
         /* ignore the error to retain Linux 2.2 compatibility */
         /* the error will be handled by bind(), anyway */
     }
diff -urN stunnel-4.39-0009/src/common.h stunnel-4.39-0010/src/common.h
--- stunnel-4.39-0009/src/common.h	2011-07-21 12:07:40.503311991 +0200
+++ stunnel-4.39-0010/src/common.h	2011-07-21 13:37:12.871191588 +0200
@@ -351,6 +351,7 @@
 #ifndef IP_TRANSPARENT
 /* old kernel headers without IP_TRANSPARENT definition */
 #define IP_TRANSPARENT 19
+#define IP_FREEBIND    15
 #endif /* IP_TRANSPARENT */
 #ifdef HAVE_LINUX_NETFILTER_IPV4_H
 #include <limits.h>
diff -urN stunnel-4.39-0009/src/options.c stunnel-4.39-0010/src/options.c
--- stunnel-4.39-0009/src/options.c	2011-07-21 12:07:57.753337297 +0200
+++ stunnel-4.39-0010/src/options.c	2011-07-21 12:51:22.127157110 +0200
@@ -1611,6 +1611,31 @@
     }
 #endif
 
+    /* transparent accept */
+#ifndef USE_WIN32
+    switch(cmd) {
+    case CMD_INIT:
+        section->option.transparent_accept=0;
+        break;
+    case CMD_EXEC:
+        if(strcasecmp(opt, "transparent_accept"))
+            break;
+        if(!strcasecmp(arg, "yes"))
+            section->option.transparent_accept=1;
+        else if(!strcasecmp(arg, "no"))
+            section->option.transparent_accept=0;
+        else
+            return "Argument should be either 'yes' or 'no'";
+        return NULL; /* OK */
+    case CMD_DEFAULT:
+        break;
+    case CMD_HELP:
+        s_log(LOG_NOTICE, "%-15s = yes|no transparent proxy mode (accept)",
+            "transparent_accept");
+        break;
+    }
+#endif
+
     /* verify */
     switch(cmd) {
     case CMD_INIT:
diff -urN stunnel-4.39-0009/src/prototypes.h stunnel-4.39-0010/src/prototypes.h
--- stunnel-4.39-0009/src/prototypes.h	2011-07-21 12:07:57.753337297 +0200
+++ stunnel-4.39-0010/src/prototypes.h	2011-07-21 13:40:38.221492752 +0200
@@ -200,6 +200,7 @@
         unsigned int pty:1;
         unsigned int transparent_src:1;
         unsigned int transparent_dst:1; /* endpoint: transparent destination */
+        unsigned int transparent_accept:1;
 #endif
         unsigned int ocsp:1;
     } option;
diff -urN stunnel-4.39-0009/src/stunnel.c stunnel-4.39-0010/src/stunnel.c
--- stunnel-4.39-0009/src/stunnel.c	2011-07-21 12:10:49.843589687 +0200
+++ stunnel-4.39-0010/src/stunnel.c	2011-07-21 13:43:03.801706300 +0200
@@ -237,6 +237,16 @@
             opt->fd=s_socket(addr.sa.sa_family, SOCK_STREAM, 0, 1, "accept socket");
             if(opt->fd<0)
                 return 1;
+#ifdef IP_TRANSPARENT
+	    {
+               int on=1;
+               if(opt->option.transparent_accept) {
+                    if(setsockopt(opt->fd, SOL_IP, IP_TRANSPARENT, &on, sizeof on) != 0 ||
+                       setsockopt(opt->fd, SOL_IP, IP_FREEBIND, &on, sizeof on) != 0 )
+                        return 0;
+                }
+            }
+#endif /* IP_TRANSPARENT */
             if(set_socket_options(opt->fd, 0)<0) {
                 closesocket(opt->fd);
                 return 1;
