From owner-freebsd-stable@FreeBSD.ORG Fri Sep 22 13:25:06 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A142616A415 for ; Fri, 22 Sep 2006 13:25:06 +0000 (UTC) (envelope-from jpn@doom.fi) Received: from pne-smtpout3-sn2.hy.skanova.net (pne-smtpout3-sn2.hy.skanova.net [81.228.8.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C73D43D88 for ; Fri, 22 Sep 2006 13:24:53 +0000 (GMT) (envelope-from jpn@doom.fi) Received: from witchfinder.doom.fi (80.223.112.194) by pne-smtpout3-sn2.hy.skanova.net (7.2.075) id 44A2F3EC0036B0A5 for freebsd-stable@freebsd.org; Fri, 22 Sep 2006 15:24:50 +0200 Received: from localhost (localhost.doom.fi [127.0.0.1]) by witchfinder.doom.fi (Postfix) with ESMTP id CE774AB13E for ; Fri, 22 Sep 2006 16:24:47 +0300 (EEST) Received: from witchfinder.doom.fi ([127.0.0.1]) by localhost (witchfinder.doom.fi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03240-05 for ; Fri, 22 Sep 2006 16:24:15 +0300 (EEST) Received: from [80.223.123.167] (dsl-lhtgw1-fe7bdf00-167.dhcp.inet.fi [80.223.123.167]) by witchfinder.doom.fi (Postfix) with ESMTP id CC181AB13C for ; Fri, 22 Sep 2006 16:24:14 +0300 (EEST) Message-ID: <4513E3F6.1030805@doom.fi> Date: Fri, 22 Sep 2006 16:24:06 +0300 From: "Jussi, Petteri Nummikko" User-Agent: Thunderbird 1.5.0.7 (X11/20060911) MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <4513D9F7.4050606@sh.cvut.cz> In-Reply-To: <4513D9F7.4050606@sh.cvut.cz> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: amavisd-new at witchfinder.doom.fi Subject: Re: Problems with OpenVPN+routing and creating tun0 interface X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jpn@doom.fi List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2006 13:25:06 -0000 Václav Haisman wrote: > Hi, > I want to set up OpenVPN to create and configure tun0 interface and > connect to OpenVPN server. The main obstacle seems to be my inability to > configure either OpenVPN or FreeBSD to actually create that tun0 interface. > > If I try to create it manually I get this: > > $ ifconfig -v tun create inet 192.168.23.203 192.168.23.1 > ifconfig: SIOCIFCREATE: Invalid argument > > The kernel config has the "device tun" line and there are tun[0-3] in /dev. > > So what am I doing wrong? > > -- > Vaclav Haisman > I had the same problem in 6.0 but not anymore in 6.1. If I remember correctly how I fixed it in 6.0, I just echoed null to /dev/tun0. But if you already have those devices I'm not sure anymore. Are you specifying the device in openvpn.con as "dev tun" or "dev tun[n]"? In 6.1 releng I have only "dev tun" and it creates the device by itself. But in OpenBSD I have to specify the device number also, even if there was just one of them.