1

I configured openvpn on my Deabian 6 VPS (using OpenVZ) several times but always stuck on "Starting virtual private network daemon: client server failed!"

The syslog indicates, that there seems to be a problem with tun/tan but i am not able to solve the issue:

Jan 14 17:00:05 netherlands ovpn-server[7359]: OpenVPN 2.1.3 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Jun  6 2013
Jan 14 17:00:05 netherlands ovpn-server[7359]: NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Jan 14 17:00:05 netherlands ovpn-server[7359]: Diffie-Hellman initialized with 1024 bit key
Jan 14 17:00:05 netherlands ovpn-server[7359]: WARNING: file 'netherlands.key' is group or others accessible
Jan 14 17:00:05 netherlands ovpn-server[7359]: /usr/bin/openssl-vulnkey -q -b 1024 -m <modulus omitted>
Jan 14 17:00:05 netherlands ovpn-server[7359]: TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Jan 14 17:00:05 netherlands ovpn-server[7359]: Socket Buffers: R=[245760->131072] S=[245760->131072]
Jan 14 17:00:05 netherlands ovpn-server[7359]: ROUTE: default_gateway=UNDEF
Jan 14 17:00:05 netherlands ovpn-server[7359]: Note: Cannot open TUN/TAP dev /dev/net/tun: Operation not permitted (errno=1)
Jan 14 17:00:05 netherlands ovpn-server[7359]: Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Jan 14 17:00:05 netherlands ovpn-server[7359]: Cannot allocate TUN/TAP dev dynamically
Jan 14 17:00:05 netherlands ovpn-server[7359]: Exiting

Can someone help me out?

6
  • Does /dev/net/tun exist? Can you ls -la it?
    – Paul
    Commented Jan 14, 2014 at 13:12
  • No, the folder does not even exist. What does that mean?
    – Lukas
    Commented Jan 14, 2014 at 13:42
  • @Paul Also tried modprobe tun but I always get "FATAL: Module tun not found."
    – Lukas
    Commented Jan 14, 2014 at 13:50
  • Are you running starting OpenVPN as root? You should. Did you add the statement script-security 2 to your conf file? Please post conf file Commented Jan 14, 2014 at 17:26
  • @MariusMatutiae Yes, I startet OpenVPN as root and actually I got to the bottom of the problem - it was simply that the tun module was not provided by OpenVZ, so after reporting the issue to the hoster, I can now run and also connect to OpenVPN. But now I need to solve the problem, that I can not access internet when using the OpenVPN connection to my server (net.ipv4.ip_forward and iptables are enabled). My server.conf: pastebin.com/TtbNgdaG
    – Lukas
    Commented Jan 14, 2014 at 21:17

1 Answer 1

0

The tun module was not available on the VPS using OpenVZ. It can be tested by checking the existance of the /dev/net/tun-folder or by modprobe tun - if the module is not available, you get a fatal error FATAL: Module tun not found. The tun module must be activated in OpenVZ. You can either report the issue to your hoster or check additional articles like the one in OpenVZ Wiki: http://wiki.openvz.org/VPN_via_the_TUN/TAP_device

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .