Sample Header Ad - 728x90

Why do I get connection refused when I telnet to port 2194?

1 vote
1 answer
6558 views
I'm setting up an OpenVPN access server and I continuously get the error "connection refused" on my client(s).  So I decided to start debugging from the beginning (the server) and tried
telnet 127.0.0.1 2194
The result:
openvpn_as_test_1:~$ telnet 127.0.0.1 2194
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
So this means the issue is on the server.  So I checked if the port was open in ufw with sudo ufw status and noticed the port was not allowed by the firewall.  After adding the port with ufw allow 2194/udp (and ufw allow 2194/tcp even when this is needed), I checked ufw status again, and this was the result:
Status: active

To                         Action      From
--                         ------      ----
2194/udp                   ALLOW       Anywhere
2194/tcp                   ALLOW       Anywhere
22                         ALLOW       Anywhere
2194/udp (v6)              ALLOW       Anywhere (v6)
2194/tcp (v6)              ALLOW       Anywhere (v6)
22 (v6)                    ALLOW       Anywhere (v6)
The port is allowed by the internal firewall, so I tried telnet 127.0.0.1 2194 again and guess what: still connection refused:
openvpn_as_test_1:~$ telnet 127.0.0.1 2194
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
Ok, what else could be the problem?  Maybe telnet does not work properly, so I tried:
openvpn_as_test_1:~$ telnet 127.0.0.1 22
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
Great, telnet is working fine, so… let's check netstat to see if we listen to port 2194:
openvpn_as_test_1:~$ netstat -al | grep "LISTEN"
tcp        0      0 0.0.0.0:943             0.0.0.0:*               LISTEN
tcp        0      0 localhost:domain        0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:https           0.0.0.0:*               LISTEN
tcp        0      0 localhost:904           0.0.0.0:*               LISTEN
tcp        0      0 localhost:905           0.0.0.0:*               LISTEN
tcp        0      0 localhost:906           0.0.0.0:*               LISTEN
tcp        0      0 localhost:907           0.0.0.0:*               LISTEN
tcp        0      0 localhost:908           0.0.0.0:*               LISTEN
tcp        0      0 localhost:909           0.0.0.0:*               LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
unix  2      [ ACC ]     SEQPACKET  LISTENING     13660    /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     22260    /run/user/1000/systemd/private
unix  2      [ ACC ]     STREAM     LISTENING     22264    /run/user/1000/gnupg/S.gpg-agent.ssh
unix  2      [ ACC ]     STREAM     LISTENING     22265    /run/user/1000/snapd-session-agent.socket
unix  2      [ ACC ]     STREAM     LISTENING     22266    /run/user/1000/gnupg/S.dirmngr
unix  2      [ ACC ]     STREAM     LISTENING     22267    /run/user/1000/gnupg/S.gpg-agent.extra
unix  2      [ ACC ]     STREAM     LISTENING     22268    /run/user/1000/gnupg/S.gpg-agent.browser
unix  2      [ ACC ]     STREAM     LISTENING     22269    /run/user/1000/gnupg/S.gpg-agent
unix  2      [ ACC ]     STREAM     LISTENING     13568    /run/systemd/private
unix  2      [ ACC ]     STREAM     LISTENING     13578    /run/systemd/journal/stdout
unix  2      [ ACC ]     STREAM     LISTENING     16810    /run/uuidd/request
unix  2      [ ACC ]     STREAM     LISTENING     16816    /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     16828    /run/acpid.socket
unix  2      [ ACC ]     STREAM     LISTENING     16830    /run/snapd.socket
unix  2      [ ACC ]     STREAM     LISTENING     16832    /run/snapd-snap.socket
unix  2      [ ACC ]     STREAM     LISTENING     13662    /run/lvm/lvmpolld.socket
unix  2      [ ACC ]     STREAM     LISTENING     13839    /run/lvm/lvmetad.socket
unix  2      [ ACC ]     STREAM     LISTENING     16861    /var/lib/lxd/unix.socket
unix  2      [ ACC ]     STREAM     LISTENING     20300    /usr/local/openvpn_as/etc/sock/sagent
unix  2      [ ACC ]     STREAM     LISTENING     20303    /usr/local/openvpn_as/etc/sock/sagent.localroot
unix  2      [ ACC ]     STREAM     LISTENING     20304    /usr/local/openvpn_as/etc/sock/sagent.api
unix  2      [ ACC ]     STREAM     LISTENING     16865    @ISCSIADM_ABSTRACT_NAMESPACE
Port 2194 is not listed here. Ok, now I have no idea how to continue. Where is my issue?
Asked by CodeNinja (231 rep)
May 7, 2020, 02:08 PM
Last activity: Jun 27, 2024, 05:20 PM