netstat – a command line tool
This command is used to find out the active TCP/IPconnection between our computer and the internet.
The practical syntax is :
netstat -n
After pressing enter we will get all active TCP connections created to our computer with the specific port number.
By using netstat command we can get the following details.
1. The address of any protocol control blocks associated with the sockets
2. The number of packets received, transmitted, and dropped
3. The local address which initiate the communication
4. The foreign IP address.
The common syntax for netstat command
1. netstat -n : Displays addresses and port numbers in numerical form
2. netstat -a : Displays all connections and listening ports
3. netstat -b : Displays the executable involved in creating each connection or listening port.
4. netstat -e : Displays Ethernet statistics
5. netstat -o : Displays the owning process ID associated with each connection
6. netstat -p proto:Shows connections for the protocol specified by protocols
7. netstat r : Displays the routing table
8. netstat s : Displays per-protocol statistics
Practical uses of netstat
1. Check which program initiated the connection:
netstat -b
We can use this command to check if any unwanted (malware) programs working on your computer.
2. We can check the routing table
3. Can find the IP address of a chat friend while establishing a connection.
0 comments:
Post a Comment