Nmap

Nmap is another very useful tool that can be used to troubleshoot or get information about your network. It scans the computer network and discovers and collects all kind of information about other hosts connected to it. Note that port scanning a network is a very controversial topic; since improperly using nmap can get you sued, fired, banned by your country, or even put in jail, we will only use it to retrieve very valuable information about our own private network here. For example, to scan the network for all available hosts and open ports, use the syntax: nmap network address.

You will see few IP addresses available that have various ports and services open. This can give you very important information about who is connected to your network and whether the services and computers are secure and not exposing unwanted details. nc or netcat is another very useful tool to help you debug and troubleshoot your server's network and firewall settings. For example, you can use it to see whether a certain port is open on a server. On the server, you want to verify the use, for example, the following command is used to open port 9999 and put a text file stream behind this port: nc -l -p 9999 < /etc/redhat-release. On any other server in this network, you could then try to access the server, for example, with the IP address 197, then with the IP address 192.168.1.1.200 on port 9999 and stream this file back, using the following nc command: nc 192.168.1.200 9999 > /tmp/redhat-release.