2
2
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?
Does
/dev/net/tun
exist? Can youls -la
it? – Paul – 2014-01-14T13:12:56.197No, the folder does not even exist. What does that mean? – Lukas – 2014-01-14T13:42:13.703
@Paul Also tried modprobe tun but I always get "FATAL: Module tun not found." – Lukas – 2014-01-14T13:50:07.413
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 – MariusMatutiae – 2014-01-14T17:26:39.520
@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: http://pastebin.com/TtbNgdaG
– Lukas – 2014-01-14T21:17:25.613Hello Lukas, this discovery might be useful to others using OpenVZ, so please answer your question and accept it, then open a new question with your access issue. – Paul – 2014-01-14T21:29:16.400