Posted by: jasonk2600 | November 17, 2009

Netstat Usage in FreeBSD

The netstat program in FreeBSD (and many other OS’s) is an invaluable tool used to display various network related information. Below are a few examples of how to use netstat.

 

To display the network routing table invoke netstat with the following options:

 

# netstat -rn

 

To display the default network route (or gateway IP address) invoke netstat with the following options:

 

# netstat -rnG

 

To display a list of all network connections, including which ports your system is listening on, invoke netstat with the following options:

 

# netstat -na

 

 [EoF]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: