Sunday, 26 November 2023

network check if port is open, and docker port open

 https://askubuntu.com/questions/9368/how-can-i-see-what-ports-are-open-on-my-machine


 sudo netstat -tulpn | grep LISTEN
    tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      5452/dnsmasq    
    tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1037/cupsd      
    tcp6       0      0 ::1:631                 :::*                    LISTEN      1037/cupsd


For docker if u want use  a port for service lets say email smtp, need to have port open on server, then map this port to docker
u need to have 
    ports:
      - "587:587"

No comments:

Post a Comment