Score:0

OpenVPN server, executing openvpn with the config as argument produces no output

jp flag

I have the following OpenVPN server config, which when I try to give as argument produces no output and simply returns.

[root ~]# cat /etc/openvpn/server/myvpnserver.conf 
port 28191
proto tcp
dev tun0

ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/vpn-rpi.crt
key /etc/openvpn/easy-rsa/pki/private/vpn-rpi.key
dh /etc/openvpn/easy-rsa/pki/dh.pem

server 192.168.1.50 255.255.255.0
keepalive 10 120
user nobody
group nobody
persist-key
persist-tun
status /var/log/openvpn-status.log
verb 3

log-append /var/log/openvpn
status /tmp/vpn.status 10

And when I try to execute it, I get:

[root ~]# openvpn /etc/openvpn/server/myvpnserver.conf
[root ~]# 

The return code from $? is 1.

This is Arch Linux on a Raspberry Pi, with OpenVPN as follows:

[root ~]# openvpn --version
OpenVPN 2.5.3 [git:makepkg/ecaf88f8a4e75856+] armv6l-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jun 18 2021
library versions: OpenSSL 1.1.1k  25 Mar 2021, LZO 2.10
Originally developed by James Yonan
Copyright (C) 2002-2021 OpenVPN Inc <[email protected]>
Compile time defines: 

Why does it produce no output? What should I do to resolve the problem?

Michael Hampton avatar
cz flag
98191 is not a valid port number.
AttributedTensorField avatar
jp flag
@MichaelHampton Thanks, I changed it to 28191 though, and I still get the exact same problem. Also updated the question.
Score:1
in flag

If the log-append config option is present, all log messages will go to that file, and not to the standard output, so you should check that file.

It might worth noting that log-append expects a filename, not a directory, which makes your config suspect. Did you really wanted to log into a file called /var/log/openvpn?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.