Thanks for your replies. I just checked OpenVPN access server and saw that in 
"server network setting" and in protocol selection you can select Multi-Daemon 
mode. I thinks that's what exactly I need. Is it implemented via tun + routing?




________________________________
 From: David Sommerseth <openvpn.l...@topphemmelig.net>
To: openvpn-devel@lists.sourceforge.net 
Sent: Monday, December 17, 2012 12:28 PM
Subject: Re: [Openvpn-devel] multiple OpenVPN instances on a single tun
 
On 17/12/12 09:31, ehsan enayati wrote:
> Hi,
> I need to run multiple instances of OpenVPN server on just one tun
> device driver (say tun0) all on same subnets. I tried editing the
> open_tun function in tun.c file, first instance goes well and creates
> tun0 but when the second one comes along it cannot use tun0 and I get
> the error "ioctl(TUNSETIFF): Device or resource busy". I really need
> this functionality. Please give me some hints.

It is not possible to do what you try to do.  Only one application can
bind to a tun or tap socket.  It's basically the same issue if you try
to have more applications bind and listen to, say port 80, at the same
time.  It's impossible.  And it's restricted by the OS.

If you need OpenVPN instances to be on the same subnet, you can use TAP
and bridge tap0 and tap1 together.  *But* I 'd rather recommend to use
tun devices, have them on separate subnets and do the rest with routing.
Using tun + routing is by far the cleanest and easiest configuration
setups.  It also gives the lowest traffic overhead and least headache
while debugging the configuration when it fails.


-- 
kind regards,

David Sommerseth


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to