Skip to main content
Topic: OpenVPN fails with OpenRC start, but works otherwise (Read 253 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

OpenVPN fails with OpenRC start, but works otherwise

Hello,
I need to use openvpn. Usually I just import the openvpn.conf file but my institution does not support that.
I needed to make an p12 certificate - I did that and it works alright (I can open it with openssl).
I was supplied with .ovpn file (linux is not 'officially' supported) which I converted to openvpn.conf. Here are its contents
Code: [Select]
client
dev tun
proto tcp
persist-key
persist-tun
nobind
;remote-cert-tls server
cipher AES-256-CBC
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384
auth SHA512

# this needs to stay uncommented because it causes errors
#keysize 256

tls-version-min 1.2
verb 7
auth-nocache

# Adres serwera VPN
remote vpn.p.lodz.pl 1194
######################################
# PCKS file here #
pkcs12 /path/to/file.p12
######################################

ca /path/to/tuChain.pem
#
tls-auth /path/to/file.key 1
#
key-direction 1

when I do
Code: [Select]
# openvpn --config /etc/openvpn/openvpn.conf
the terminal gets flooded with messages and my IP changes.

I have added the file to KDE Plasma's interface and it also works fine.

However, for some reason starting it with rc-service does not work:
Code: [Select]
# rc-service openvpn start
[sudo] password for egycobra:
openvpn          | * Caching service dependencies ...         [ ok ]
openvpn          | * Starting openvpn ...
openvpn          | * start-stop-daemon: failed to start `/usr/bin/openvpn'
openvpn          | * Check your logs to see why startup faile [ !! ]
openvpn          | * WARNING: openvpn has started, but is inactive

I have checked the /etc/init.d/openvpn file and it looks alright.
Where do I get the logs? What is causing this?