Posts Tagged ‘netstat’

Files

/etc/hostname – holds the hostname
/etc/hosts – file mapping of IP addresses – hostnames
/etc/networks – maps network addresses -names
/etc/host.conf – replaced by nsswitch
/etc/resolv.conf – client dns configuration
/etc/services – maps port numbers to names
/etc/nsswich.conf – name service switch configuration file, determines how system looks up name and various other things.

Commands

ifconfig – show and configure network interfaces
route – show and configure network routes
dhcpcd, dhcpclient, pmp – DHCP clients
dig – tests DNS servers
host – query and debug DNS servers
hostname – display hostname, and NIS domaind setting
netstat – shows what service is listening on what port
ping – sends ICMP echo request to hosts
traceroute – show the path (display routes) that a network connection takes.
mtr – works like traceroute in real time
tcpdump – packet sniffer command that displays the contents of packets received on a network interface.
route -n – view the routing table
whois – queries information about the owner of the domain

Netstat
netstat -a -u -t – Prints ports in use
netstat -r – Prints routing table
netstat -i – Prints interfaces
netstat -g – Prints multicast groups
netstat -M – Prints masqueraded connections
netstat -s – Prints statistics

netstat (network statistics) is a command-line tool that displays network connections (both incoming and outgoing), routing tables, and a number of network interface statistics. It is available on Unix, Unix-like, and Windows NT-based operating systems.
It is used for finding problems in the network and to determine the amount of traffic on the network as a performance measurement. [wikipedia.com]

Parameters used with netstat command are:

netstat /? Output

In case you want to kill a process without knowing its name and the only information you’ve got is a port number; there’s no need to worry about it. Here are the six simple steps in KILLING A PROCESS BASED ON A SPECIFIC PORT NUMBER.

1. Go to RUN and type cmd
2. Use netstat -aon | find ":port number" command to view a specific network port if it is in use or not. 
3. Go to Task Manager (Alt+Ctrl+Del)
4. Select Processes Tab
5. Check PID on view menu
6. Kill the process base on PID

If you want to change a port number, you may edit services file located on C:\WINDOWS\system32\drivers\etc