How Do You Troubleshoot a False “State” Value in nmap Results?

Background
For troubleshooting networking issues with a Linux/Unix server, the nmap utility is extremely useful.  For Windows with PowerShell version 3, there is a script can help you almost as much as nmap; see this posting if you are interested.  For newer versions of PowerShell, use the Test-NetConnection command.  

Problem scenario
You use nmap to test a port on an IP address.  

How Do You Determine a MAC Address of an IoT Device (without Network Administrator Access to a Router)?

Problem scenario
You have a device (e.g., some IoT gadget such as an EZviz camera) that can connect to a network (e.g., via WiFi).  But you do not have access to the administration (e.g., back end) of the router itself. You want to learn the IoT device’s MAC address (e.g., for a third party that can grant the device WiFi access).  If you administered the router,

How Do You Troubleshoot a CentOS Server Not Being Able to Reach the Internet or outside Your Network?

Problem scenario:  From a CentOS server, you try to ping an IP address outside of your network (e.g., 8.8.8.8).  You get “connect: Network is unreachable” as the response.  Your server has an IP address and subnet mask.  What is wrong?

Solution
1.  Ensure that the network has a default gateway.  If the network equipment that connects the server to the network has no gateway to outside the network,

How Do You Configure Two Linux Guest Servers Running on Oracle VirtualBox to Have Network Connectivity with Each Other?

Problem scenario:  On a Windows host you have Oracle VirtualBox.  You want to establish TCP/IP connectivity with the two guest CentOS Linux virtual servers.  When you try to ping one from the other, you get “destination host unreachable.”  The servers have Internet connectivity.  How do you get them to communicate with each other via a networking protocol?

Solution
On each guest server,

How Do You Find the Network Interface Name of a CentOS 7.X Server That Will Connect to the Default Gateway of Your Network?

Problem scenario:  You want to find the name of the network interface that can connect to the default gateway on your Linux CentOS 7.x server.  Typical new deployments of CentOS 7.x using the minimal .ISO do not have the “route” utility nor the “ifconfig” utility installed.  How do you find the interface’s name (e.g., eth0) without using the “route” command? 

When Running Oracle VirtualBox on a Windows Host with a Linux Guest, What Does the Linux Guest Think Is the IP Address of the Host?

Problem scenario:  You have Oracle VirtualBox installed on a Windows host.  You have Linux CentOS as a guest VM. You want to test network connectivity (e.g., hostname resolution).  You want to know what IP address the Linux guest could use to interact with the Windows host.

Solution
Install traceroute with this command:

sudo yum -y install traceroute

Then use this command:

traceroute 8.8.8.8

The results of the above traceroute command will show you the packet hop from the Linux guest to the Windows host. 

How Do You Troubleshoot an Apache Web Service Problem when from a Web Browser You Receive the Error “The Address Is Restricted”?

Problem scenario
You are using Oracle VirtualBox on a Windows host.  You are using a Linux guest that is running Apache web server.  The Apache httpd service is running on the guest Linux server.  But when you are on the Windows host, you try to access the website, you get an error in the web browser.  This is the error you receive:

“This address is restricted
This address uses a network port which is normally used for purposes other than Web browsing.

How Do You Find The Default Gateway of Your Linux Server?

Problem scenarios:  Either you are using CentOS 7.x (and ifconfig is even not a command) or you are using ifconfig and different flags (like -v for verbose), but you cannot find the default gateway.  How do you know if you have a default gateway even configured on a Linux server?

Solution  The “ifconfig” command cannot show the default gateway.  To find the default gateway on your Linux server,

How Do You Use Putty To Connect To A CentOS Server (A Guest VM running on Oracle VirtualBox on a Windows Host)?

Problem scenario:  You have a Windows 7 host with Oracle VirtualBox.  You have a guest CentOS Linux virtual server.  How do you connect to a CentOS VM using networking?

Miscellaneous:  If you are looking for directions on how to give a Linux guest access to the Internet, these directions will work (assuming the host is running Windows).

Solution
#1  In Oracle VirtualBox go to Devices -Network -Network Settings. 

Oracle VirtualBox Client (or VM or virtual Linux server) Has No Internet Access

Problem scenario:  You are running Linux 7.x in Oracle VirtualBox on a Windows Professional 7 laptop.  In the Linux server, you try to ping an IP address.  You get “connect: Network is unreachable.”

Solution

1.  In the Oracle VirtualBox window of the server, go to Devices -> Network Settings -> Adapter 1

     a) Go to Attached To: and choose “NAT”

b) Check the box for “Cable Connected”

2.