This Banner is For Sale !!
Get your ad here for a week in 20$ only and get upto 15k traffic Daily!!!

netstat – DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»




netstat

Netstat is one other highly effective utility that’s used to show community statistics about community connections, routing tables, and interfaces.

That is fairly helpful in a number of eventualities, as an example for troubleshooting community points (for instance, port or connection points) or to observe community visitors and to detect malicious exercise.

The syntax of the netstat command is as follows: netstat [options] [filter] [address]. Right here, choices can be utilized to specify sure parameters, comparable to which protocol to make use of, which ports to point out, and which connection states to show. The filter parameter is used to filter the output based mostly on particular standards, such because the supply or vacation spot IP deal with. The deal with parameter is used to specify an IP deal with or port.

  • To show all of the lively community connections:
$ netstat -a
Enter fullscreen mode

Exit fullscreen mode

  • To show all of the listening ports:
$ netstat -l
Enter fullscreen mode

Exit fullscreen mode

  • To show all TCP ports:
$ netstat -at 
Enter fullscreen mode

Exit fullscreen mode

  • To show all UDP ports:
$ netstat -au 
Enter fullscreen mode

Exit fullscreen mode

  • To show kernal IP routing desk:
  • PS: The kernel IP routing desk, is often known as the IP routing desk, which comprises details about the community topology and routing paths on a Linux system.
$ netstat -r
Enter fullscreen mode

Exit fullscreen mode

  • To show the interface desk:
$ netstat -i
Enter fullscreen mode

Exit fullscreen mode

  • To discover a course of that’s utilizing a selected port, in beneath instance we’re utilizing | to fed the output of netstat to grep to filter out the outcomes.
  • -n is to get the IP addresses/numeric values (as a substitute of domains).
$ netstat -an | grep <PORT_NUMBER>
Enter fullscreen mode

Exit fullscreen mode

It’s fairly highly effective, be at liberty to verify its capabilities through man netstat.

The Article was Inspired from tech community site.
Contact us if this is inspired from your article and we will give you credit for it for serving the community.

This Banner is For Sale !!
Get your ad here for a week in 20$ only and get upto 10k Tech related traffic daily !!!

Leave a Reply

Your email address will not be published. Required fields are marked *

Want to Contribute to us or want to have 15k+ Audience read your Article ? Or Just want to make a strong Backlink?