3 ms·
A neat command is `sudo lsof -i -P` which will show something like this: java 1114 elasticsearch IPv6 TCP localhost:9200 nginx 1169 w
by sandstrom 11y ago
A neat command is `sudo lsof -i -P` which will show something like this:
java 1114 elasticsearch IPv6 TCP localhost:9200
nginx 1169 www-data IPv6 TCP *:80
nginx 1169 www-data IPv6 TCP *:443
dhclient 1620 root IPv4 UDP *:68
sshd 1697 root IPv6 TCP *:22
I.e. services listening on various ports. Knowing which services are running plus a firewall as an extra precaution goes a long way to avoid issues like this.