I'm trying to install OpenVPN on a Centos VPS purchased from budgetvm.com. After I've seemingly successfully installed everything, I'm having the following issues:
When trying to issue the
service openvpn start
command I am greeted with this error:
Starting openvpn: [FAILED]
I check /var/log/messages, and this is the relevant part:
nvpn/plugins/openvpn-plugin-auth-pam.so] [/etc/pam.d/login]' intercepted=PLUGIN_AUTH_USER_PASS_VERIFY
Feb 6 03:41:20 server1 openvpn[10784]: Diffie-Hellman initialized with 1024 bit key
Feb 6 03:41:20 server1 openvpn[10784]: WARNING: POTENTIALLY DANGEROUS OPTION --client-cert-not-required may accept clients which do not present a certificate
Feb 6 03:41:20 server1 openvpn[10784]: Socket Buffers: R=[245760->131072] S=[245760->131072]
Feb 6 03:41:20 server1 openvpn[10784]: ROUTE_GATEWAY ON_LINK IFACE=venet0 HWADDR=00:00:00:00:00:00
Feb 6 03:41:20 server1 openvpn[10784]: [b]ERROR: Cannot open TUN/TAP dev /dev/net/tun: Operation not permitted (errno=1)[/b]
Feb 6 03:41:20 server1 openvpn[10784]: Exiting due to fatal error
I ran the ls -l command in /dev/net/, this is the output:
crwxrwxrwx 1 root root 10, 200 Feb 6 03:32 tun
When I try to use the cat command on the tun file, I get the same error:
cat: /dev/net/tun: Operation not permitted
Here's the config file I'm using:
local 23.88.239.243
port 1194 #- port
proto udp #- protocol
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
user nobody
group nobody
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/aplha.crt
key /etc/openvpn/easy-rsa/keys/aplha.key
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
plugin /usr/lib64/openvpn/plugins/openvpn-plugin-auth-pam.so /etc/pam.d/login
client-cert-not-required
username-as-common-name
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status 1194.log
verb 3
If you need any more info, make sure to alert me.