Analyzing Open Ports and Their Listening Processes

Mindwatering Incorporated

Author: Tripp W Black

Created: 05/05/2006 at 09:59 AM


Domino Server Issues Troubleshooting, Microsoft Server Software

Use netstat command to analyze the current open ports and the tasks/processes listening/using those ports.

e.g netstat -nao | more
Displays network connections including the protocol (TCP or UDP), the IP address, the ports listening, and the PID/process using port, one page at a time.

For example, Domino is reporting that bindsock cannot give it port 25 for the SMTP process. Mostly like postfix is running on the server since an update. To confirm:
$ sudo netstat -tuplen | grep 25
tcp 0 0* LISTEN 0 26402 2084/master
tcp6 0 0 ::1:25 :::* LISTEN 0 26403 2084/master

$ sudo readlink -f /proc/2084/exe

$ sudo status postfix.service
... running ...

$ sudo stop postfix.service
$ sudo disable postfix.service
Removed symlink /etc/systemd/system/

$ sudo netstat -tuplen | grep 25
<nothing on port 25 returned >

previous page