Why is port not open? (Not UFW; Service is running)

6,022

It only listens on the loopback interface 127.0.0.1:

$ sudo netstat -tnlp | grep :2113
tcp        0      0 127.0.0.1:2113   0.0.0.0:*     LISTEN      24854/eventstored

Services will only receive packets from interfaces they listen to. You can commonly specify 0.0.0.0 as listen address in the service, to make it listen on all interfaces.

According to the documentation, port 2113 is the administrative interface. It may be a good idea to leave this accessible only to localhost, and use ssh port forwarding to access the service.

Share:
6,022

Related videos on Youtube

Stewart
Author by

Stewart

Updated on September 18, 2022

Comments

  • Stewart
    Stewart over 1 year

    On the target machine, running Ubuntu 18.04:

    $ sudo netstat -tnlp | grep :2113
    tcp        0      0 127.0.0.1:2113   0.0.0.0:*     LISTEN      24854/eventstored
    

    The service responds to HTTP request:

    $ curl localhost:2113
    Moved
    

    Tried with UFW disabled, and enabled with port 2113 open:

    $ sudo ufw status
    Status: inactive
    

    Or:

    $ sudo ufw status
    Status: active
    
    To                         Action      From
    --                         ------      ----
    Nginx Full                 ALLOW       Anywhere                  
    2113                       ALLOW       Anywhere                  
    22/tcp                     ALLOW       Anywhere                  
    Nginx Full (v6)            ALLOW       Anywhere (v6)             
    2113 (v6)                  ALLOW       Anywhere (v6)             
    22/tcp (v6)                ALLOW       Anywhere (v6)
    

    In both cases, from the client machine (also running Ubuntu 18.04)

    $ curl 192.168.178.34:2113
    curl: (7) Failed to connect to 192.168.178.34 port 2113: Connection refused
    

    Ping confirms the IP address is correct.

    What else may be preventing the connection?