Lets Play with Netstat

Hello Readers !!

Today I am here with few commands that you can use in your Ubuntu System to know about Network Related information.

The command I can simply say netstat: http://linux.die.net/man/8/netstat

Man - page you surely going to need for reference. Just open a terminal with CTRL+ALT+T (If Ubuntu) and then changed to root user with

either
sudo -i
or su  -root

Then start now!!

  1. How many ports you have in your System ? 
                            # netstat -a 
     2.  How may ports are listening now ?

                             # netstat -l
     3. What is the routing of your network ?

                            # netstat -r
      4. If a program/service access some port number , what is it ?

                         # netstat -ap | grep ftp
       Hope that helps. For more information use that man-page.

0 comments:

Post a Comment