When you want to find out what port is that service running on there’s a nice command to help you.
It’s called netstat and it’s available on Windows and Linux.
Here’s a couple of usage examples:
- Find who’s connected to your port 25 (Usually SMTP Server).
- Windows: netstat -ano | findstr :25 | findstr ESTABLISHED
- Linux: netstat -ano | grep :25 | grep ESTABLISHED
- Find what port’s are listening.
- Windows: netstat -ano | findstr LISTENING
- Linux: netstat -ano | grep LISTENING
You can use multiple combinations of this command with regular expression filters to get what you need. This is a great tool to find what ports are being used and from where.
Enjoy.