OpenVPN + CentOS = Trouble?

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
MaxusHastings
Posts: 1
Joined: 2008/09/04 21:38:37
Contact:

OpenVPN + CentOS = Trouble?

Post by MaxusHastings » 2008/09/04 21:44:27

Hey Everyone!

Currently trying to get OpenVPN to work on my CentOS box, however not getting very far with it. I have followed the guide here: http://www.throx.net/2008/04/13/openvpn-and-centos-5-installation-and-configuration-guide/

No problems with the guide, everything worked well! However when i goto start the openVPN service it fails with the following output in the log:

Sep 4 18:01:07 alpha openvpn[3137]: OpenVPN 2.0.9 i386-redhat-linux [SSL] [LZO] [EPOLL] built on Sep 4 2008
Sep 4 18:01:07 alpha openvpn[3137]: Diffie-Hellman initialized with 1024 bit key
Sep 4 18:01:07 alpha openvpn[3137]: TLS-Auth MTU parms [ L:1574 D:138 EF:38 EB:0 ET:0 EL:0 ]
Sep 4 18:01:07 alpha openvpn[3137]: Note: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
Sep 4 18:01:07 alpha openvpn[3137]: Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Sep 4 18:01:07 alpha openvpn[3137]: Cannot allocate TUN/TAP dev dynamically
Sep 4 18:01:07 alpha openvpn[3137]: Exiting

I then heard that i need to check the tun adapter, so ran the command "openvpn --dev tun0" which gave this output:

Thu Sep 4 18:24:57 2008 OpenVPN 2.0.9 i386-redhat-linux [SSL] [LZO] [EPOLL] built on Sep 4 2008
Thu Sep 4 18:24:57 2008 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Thu Sep 4 18:24:57 2008 ******* WARNING *******: all encryption and authentication features disabled -- all data will be tunnelled as cleartext
Thu Sep 4 18:24:57 2008 Note: Cannot open TUN/TAP dev /dev/net/tun: Permission denied (errno=13)
Thu Sep 4 18:24:57 2008 Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Thu Sep 4 18:24:57 2008 Cannot open TUN/TAP dev /dev/tun0: No such file or directory (errno=2)
Thu Sep 4 18:24:57 2008 Exiting

===============================================================

I have spent hours trying to get his working, posted in numerous forums and still not really getting anywhere :( If anyone can offer a hand or any advice i would REALLY appreciate it!

Cheers,

Maxus

movieman
Posts: 180
Joined: 2008/03/20 05:19:16
Location: Canada

Re: OpenVPN + CentOS = Trouble?

Post by movieman » 2008/09/05 23:12:59

Are you running a server for people to connect to, or a client that's connecting to an OpenVPN server elsewhere? I have no problems connecting with the OpenVPN client on my CentOS box when I work from home.

I did, however, have to delete some Windows-isms from the OpenVNP client configuration file I was given; maybe you've got some in there too.

amires
Posts: 5
Joined: 2006/02/16 10:56:47

OpenVPN + CentOS = Trouble?

Post by amires » 2008/09/06 09:38:16

Hi,

These are the openvpn rpms I use on our office networks :


i386
-------
http://dag.wieers.com/rpm/packages/openvpn/openvpn-2.0.9-1.el5.rf.i386.rpm
http://dag.wieers.com/rpm/packages/lzo2/lzo2-2.02-3.el5.rf.i386.rpm


x86_64
-------
http://dag.wieers.com/rpm/packages/openvpn/openvpn-2.0.9-1.el5.rf.x86_64.rpm
http://dag.wieers.com/rpm/packages/lzo2/lzo2-2.02-3.el5.rf.x86_64.rpm


You might want to try these. Also please post your server and client configuration files here
so I can take a look at them (don't forget to blank ips for security reasons)

Msquared
Posts: 21
Joined: 2007/04/23 16:57:18
Contact:

Re: OpenVPN + CentOS = Trouble?

Post by Msquared » 2008/09/08 07:03:48

You might like to install the DAG repository and use Yum (or whatever you prefer) in order to install OpenVPN. This will also automatically install lzo2 for you.

Fetch the appropriate package from here:
* http://dag.wieers.com/rpm/packages/rpmforge-release/
For example:
* http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Install it. For example:
* rpm -i rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Now you can install OpenVPN like so:
* yum -y install openvpn

Yum will automatically install lzo2 for you, too.

This also means you can update OpenVPN when you update everything else on your system:
* yum update

Post Reply