OpenVZ Forum


Home » General » Support » *SOLVED* openvpn in VE / Debian - sarge
*SOLVED* openvpn in VE / Debian - sarge [message #10318] Wed, 14 February 2007 22:57 Go to next message
bknip is currently offline  bknip
Messages: 4
Registered: February 2007
Junior Member
Hi,

I am trying hard to install openvpn inside a VE, but until now I had no success.

In detail:

I followed this HOWTO:
http://wiki.openvz.org/VPN_via_the_TUN/TAP_device

TUN is loaded on HN:
Quote:


# lsmod | grep tun
tun 7136 0


VE is authorized to use tun/tap, device is installed on VE
Quote:


# vzctl set 1001 --devices c:10:200:rw --save
# vzctl exec 1001 mkdir -p /dev/net
# vzctl exec 1001 mknod /dev/net/tun c 10 200
# vzctl exec 1001 chmod 600 /dev/net/tun



openvpn ist compiled, installed, and configured on VE, but the attempt to start openvpn fails:

Quote:


~# openvpn --config /etc/openvpn/server.conf
Wed Feb 14 22:16:22 2007 OpenVPN 2.0.9 i686-pc-linux [SSL] [LZO] [EPOLL] built on Feb 14 2007
Wed Feb 14 22:16:22 2007 Diffie-Hellman initialized with 1024 bit key
Wed Feb 14 22:16:22 2007 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Wed Feb 14 22:16:22 2007 Note: Cannot open TUN/TAP dev /dev/net/tun: Permission denied (errno=13)
Wed Feb 14 22:16:22 2007 Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Wed Feb 14 22:16:22 2007 Cannot allocate TUN/TAP dev dynamically
Wed Feb 14 22:16:22 2007 Exiting



What's going wrong here? Why does openvpn get no access (user root has same result)

Thanks for any idea!

Best regards
Burkhard

[Updated on: Sat, 17 February 2007 02:29]

Report message to a moderator

Re: openvpn in VE / Debian - sarge [message #10329 is a reply to message #10318] Thu, 15 February 2007 10:37 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

Please, specify the kernel you're using.

Thanks
Re: openvpn in VE / Debian - sarge [message #10389 is a reply to message #10318] Sat, 17 February 2007 02:28 Go to previous message
bknip is currently offline  bknip
Messages: 4
Registered: February 2007
Junior Member
Well, the solution seems to be obvious.

Of course the tun device has to be activated on the HN before giving access to the VE.

So first on HN:

Quote:


# mkdir -p /dev/net
# mknod /dev/net/tun c 10 200
# chmod 600 /dev/net/tun



and after that on VE

Quote:


# vzctl set 1001 --devices c:10:200:rw --save
# vzctl exec 1001 mkdir -p /dev/net
# vzctl exec 1001 mknod /dev/net/tun c 10 200
# vzctl exec 1001 chmod 600 /dev/net/tun



Now everything works!

Burkhard
Previous Topic: *SOLVED* Time difference between hwnode and vps
Next Topic: *SOLVED* ETH Device problem in VPS
Goto Forum:
  


Current Time: Wed Jul 10 07:17:47 GMT 2024

Total time taken to generate the page: 0.02588 seconds