Problems with OpenVPN+routing and creating tun0 interface

Marius Rex marius at communityconnect.com
Fri Sep 22 08:08:16 PDT 2006


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 set up a new OpenVPN instance  last week on FreeBSD 5.4-stable.  The tun0 device was auto-created by OpenVPN when I ran the init script.  (Of course it was in my kernel config first.)  I just have 'dev tun' in my OpenVPN configuration file.
 
To me, the funny thing is that I am running it on an older FreeBSD box because the Red Hat Enterprise 4 server I was given would not create a tun device whatever I did.  Just like you I could not create it by hand or have OpenVPN do it.  The OpenVPN server instance on the other side is a RHE4, and it worked automagically with no effort.  I used the same software to install it on both RHE instances, so it is all a bit fishy.        
 
---------------------------------------------------------
Marius M. Rex
Sr. System Admin
Community Connect Inc.
marius at mail.communityconnect.com



More information about the freebsd-stable mailing list