Auditing active TCP/UDP listening network ports on Linux servers ensures only authorized web server services (e.g. port 80/443) are exposed.

Socket Statistics (ss) Commands

Terminal Commandsbash
# Display all TCP/UDP listening sockets with process names and PIDs
sudo ss -tulpn
 
# Display process listening on port 80
sudo lsof -i :80