References: <1355733093.65651.YahooMailNeo@...1779...> <50CEDEA3.7040408@...1114...> Message-ID: <1355752871.55418.YahooMailNeo@...1767...> Date: Mon, 17 Dec 2012 06:01:11 -0800 (PST) From: ehsan enayati In-Reply-To: <50CEDEA3.7040408@...1114...> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-613093590-1345799768-1355752871=:55418" Subject: Re: [Openvpn-devel] multiple OpenVPN instances on a single tun Reply-To: ehsan enayati List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "openvpn-devel@lists.sourceforge.net" ---613093590-1345799768-1355752871=:55418 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 To: openvpn-devel@lists.sourceforge.net=20 Sent: Monday, December 17, 2012 12:28 PM Subject: Re: [Openvpn-devel] multiple OpenVPN instances on a single tun =20 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.=A0 Only one application can bind to a tun or tap socket.=A0 It's basically the same issue if you try to have more applications bind and listen to, say port 80, at the same time.=A0 It's impossible.=A0 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.=A0 *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.=A0 It also gives the lowest traffic overhead and least headache while debugging the configuration when it fails. --=20 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= ---613093590-1345799768-1355752871=:55418 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
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 wha= t exactly I need. Is it implemented via tun + routing?



= From: David Sommerseth <ope= nvpn.list@...1114...>
To: openvpn-devel@lists.sourceforge.net
Sent: Monday, December 17, 2012 12:28 PM
Subject: Re: [Openvpn-devel] multi= ple OpenVPN instances on a single tun

On 17/12/12 09:31, ehsan enayati wrote:
> Hi,
> I need to run m= ultiple instances of OpenVPN server on just one tun
> device driver (= say tun0) all on same subnets. I tried editing the
> open_tun functio= n 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 fun= ctionality. 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 sock= et.  It's basically the same issue if you try
to have more applicat= ions bind and listen to, say port 80, at the same
time.  It's impos= sible.  And it's restricted by the OS.

If you need OpenVPN inst= ances 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 debu= gging the configuration when it fails.


--
kind regards,
<= br>David Sommerseth


--------------------------------------------= ----------------------------------
LogMeIn Rescue: Anywhere, Anytime Rem= ote support for IT. Free Trial
Remotely access PCs and mobile devices an= d provide instant support
Improve your efficiency, and focus on deliveri= ng more value-add services
Discover what IT Professionals Know. Rescue d= elivers
http://p.sf.net/sfu/logmein_12329d2d
____________________________= ___________________
Openvpn-devel mailing list
Openvpn-devel@...1466...= urceforge.net
https://lists.sourceforge.net/lists/list= info/openvpn-devel


= ---613093590-1345799768-1355752871=:55418--