OpenVPN does not listen (on any port)

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
julo
OpenVpn Newbie
Posts: 3
Joined: Fri Aug 31, 2018 5:51 pm

OpenVPN does not listen (on any port)

Post by julo » Sat Sep 01, 2018 2:54 pm

Hello,

I am trying to setup OpenVPN server on Debian and found out that OpenVPN service does not listen on any port. I t does not work even with the very simple configuration from Mini HowTo (https://openvpn.net/index.php/open-sour ... howto.html), just switched to TCP.

My configuration file is like this (I generated static key).

server config

dev tun
proto tcp
ifconfig 10.8.0.1 10.8.0.2
secret static.key


When I start OpenVPN using "systemstl start openvpn", it does not listen on on any port (should listen on TCP 1194), verified by "netstat -nlp".

output from "systemstl status openvpn" is like this, so OpenVPN server is running.
● openvpn.service - OpenVPN service
Loaded: loaded (/lib/systemd/system/openvpn.service; enabled)
Active: active (exited) since Sat 2018-09-01 16:44:19 CEST; 1min 51s ago
Process: 17724 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 17724 (code=exited, status=0/SUCCESS)

Do you have any idea where can be the problem?

Thanks in advance

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 5106
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN does not listen (on any port)

Post by TinCanTech » Sat Sep 01, 2018 3:03 pm

Do not start openvpn with systemd until you have a correct service file.

Instead, start it like so:

Code: Select all

$ sudo openvpn --config /path/to/server.conf

julo
OpenVpn Newbie
Posts: 3
Joined: Fri Aug 31, 2018 5:51 pm

Re: OpenVPN does not listen (on any port)

Post by julo » Sat Sep 01, 2018 5:00 pm

You are right, different config file was used by openvpn than the one I edited. Thanks!

Post Reply