Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6195

Allow to connect to the port opened in docker container

$
0
0

I have a web server in docker. In docker-compose I have opened a port by line:

ports:  - "5555:5555"

So, now my port 5555 on the server is allocated, we can check it by sudo lsof -i -P -n

docker-pr 1322693            root    4u  IPv4 5837114      0t0  TCP *:5555 (LISTEN)docker-pr 1322698            root    4u  IPv6 5833385      0t0  TCP *:5555 (LISTEN)

I can simply connect to that port on the server only if I am inside the server.But I need to connect it by nc -vz [serverIP] 5555 from any other device

So I need to allow forwarding on the server using this manual and allow my port via ufw allow 5555 or ufw allow 5555/tcp

enter image description here

ip_forward = 1

However, I still can not connect to my server port.

So, where I did a mistake? How to connect to port 5555 on my Linode server remotely?

Ubuntu 20.04.6 LTSLinode


Viewing all articles
Browse latest Browse all 6195

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>