Check open ports - server
FreeBSD
sockstat
- -4 = IPv4 sockets
- -6 = IPv6 sockets
- -c = only connected sockets
- -l = listening sockets
Linux
lsof
lsof -P -n -iTCP -sTCP:LISTEN,ESTABLISHED
netstat
TCP, UDP
ss
Windows
# Get PID
$ netstat -aon
# and looking in tasklist
#
# With process name, but on the other line
$ netstat -abn