Hi,
First thing, this is my first post so please let me know if I'm doing something the best/appropriate way 🙂
I'm running a couple of instances of OpenVPN 2.3.2 on a CentOS 6.5, in an OpenVZ environment (might have guessed VPS provider), this had previously been working. I'm not 100% sure if it was me updating OpenVPN or another package but things broke. Since I've come across this issue I'm testing with only one server config.
Tue Jun 17 20:29:59 2014 us=721375 Diffie-Hellman initialized with 1024 bit key
Tue Jun 17 20:29:59 2014 us=721708 TLS-Auth MTU parms [ L:1559 D:140 EF:40 EB:0 ET:0 EL:0 ]
Tue Jun 17 20:29:59 2014 us=721734 Socket Buffers: R=[87380->131072] S=[16384->131072]
Tue Jun 17 20:29:59 2014 us=721847 ROUTE_GATEWAY ON_LINK IFACE=venet0 HWADDR=00:00:00:00:00:00
Tue Jun 17 20:29:59 2014 us=723126 TUN/TAP device tun0 opened
Tue Jun 17 20:29:59 2014 us=723144 TUN/TAP TX queue length set to 100
Tue Jun 17 20:29:59 2014 us=723160 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Tue Jun 17 20:29:59 2014 us=723176 /sbin/ip link set dev tun0 up mtu 1500
RTNETLINK answers: Operation not supported
Tue Jun 17 20:29:59 2014 us=724087 Linux ip link set failed: external program exited with error status: 2
Tue Jun 17 20:29:59 2014 us=724104 Exiting due to fatal error
Above a snippet of the log, which seems to fail upon the ifconfig, which seems weird to me as from what I understand it to be, it is turning IPv6 off.
I have tried adding the -ifconfig-noexec parameter and the VPN comes up fine, although as expected no interface is configured :p
openvpn --config server.conf --ifconfig-noexec
No idea how to configure TUN using the environmental variables with a script
After a lot of searching I've failed to find anything related to RTNETLINK answers: Operation not supported and this particular situation but that may be due to this particular issue being over my head a little. My suspicion is that it's related to the tun version, or how the newer version of OpenVPN relates OpenVZ.
Thanks for your time and hopefully help :p or pointing me in the right direction if I need to get help from elsewhere (OpenVZ or somthing)
My Config
port 1195
proto udp
dev tun
cipher AES-128-CBC
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
client-to-client
keepalive 5 30
verb 5