With the help of the commands below, you can check active connections on Linux server on different ports:-
   netstat -ntu | grep ‘:143’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort
   netstat -ntu | grep ‘:110’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort
   netstat -ntu | grep ‘:25’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort
   netstat -ntu | grep ‘:80’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort
]]>