Tuesday, October 18, 2005

Listing Network-Connections

There are many ways to list the open connections on a *NIX-based system, the first option that comes to mind is usually netstat. The article CLI Magic: Trojan Scan at linux.com talks about two important things to keep in mind:

  1. There is always more than one way on *NIX

  2. There are tools on every *NIX box, waiting to be chained together to achieve results


I did not investigate the program the article is talking about, I will later, though. What tickled my fancy was the fact that I almost forgot that lsof can be used as well.
In a nutshell: lsof -Pni gives you a listing of the currently opened connections.