tun device creation on boot
Hi all! I'm using OpenVPN to connect two departments with a central department. For this I'm using routing. In the central department I have an OpenVPN server which is using the /dev/net/tun1 and /dev/net/tun2 devices that I've created manually. Debian only creates a /dev/net/tun device. How I can achieve that on boot these devices to be created? I had thought of adding lines to create in /etc/rc.local, but there may be a more appropriate way to do it. Thanks in advance for your replies. Regards, Daniel -- Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37 Powered by Debian GNU/Linux Lenny - Linux user #188.598 signature.asc Description: Digital signature
Re: tun device creation on boot
On Sun, Jan 16, 2011 at 10:44:56AM -0300, Daniel Bareiro wrote: Hi, I'm using OpenVPN to connect two departments with a central department. For this I'm using routing. In the central department I have an OpenVPN server which is using the /dev/net/tun1 and /dev/net/tun2 devices that I've created manually. Debian only creates a /dev/net/tun device. How I can achieve that on boot these devices to be created? I had thought of adding lines to create in /etc/rc.local, but there may be a more appropriate way to do it. Long time since I've been working with OpenVPN and routed interfaces but I always used the dynamic approach to setup the needed interfaces. You can create the interfaces for static tunnels with e.g. openvpn --mktun --dev tun0 Maybe there's also a way to do this via udev rules but I'm not sure how viable that is. I think I would bring them up with the physical interface they use via /etc/network/interface running 'up openvpn...' Sven -- And I don't know much, but I do know this: With a golden heart comes a rebel fist. [ Streetlight Manifesto - Here's To Life ] -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110116142133.GA1786@marvin
Re: tun device creation on boot
On Sun January 16 2011 05:44:56 Daniel Bareiro wrote: I'm using OpenVPN to connect two departments with a central department. For this I'm using routing. In the central department I have an OpenVPN server which is using the /dev/net/tun1 and /dev/net/tun2 devices that I've created manually. Debian only creates a /dev/net/tun device. How I can achieve that on boot these devices to be created? I had thought of adding lines to create in /etc/rc.local, but there may be a more appropriate way to do it. /dev/net/tun is all you need. In your various OpenVpn config files just specify dev tun5 or whatever. tun5 and friends will appear by magic when needed in /sys/class/net (but not in /dev where they are not needed). --Mike Bird -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/201101160959.30861.mgb-deb...@yosemite.net
Re: tun device creation on boot
Hi, Mike. On Sunday, 16 January 2011 09:59:30 -0800, Mike Bird wrote: I'm using OpenVPN to connect two departments with a central department. For this I'm using routing. In the central department I have an OpenVPN server which is using the /dev/net/tun1 and /dev/net/tun2 devices that I've created manually. Debian only creates a /dev/net/tun device. How I can achieve that on boot these devices to be created? I had thought of adding lines to create in /etc/rc.local, but there may be a more appropriate way to do it. /dev/net/tun is all you need. In your various OpenVpn config files just specify dev tun5 or whatever. tun5 and friends will appear by magic when needed in /sys/class/net (but not in /dev where they are not needed). Perfect! Thanks for the explanation! I had manually created these on /dev/net and then I used in the config files something like this: dev-node /dev/net/tun2 Thanks for your reply. Regards, Daniel -- Daniel Bareiro - System Administrator Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37 Powered by Debian GNU/Linux Lenny - Linux user #188.598 signature.asc Description: Digital signature