LAB 39 ‐ Network troubleshooting ‐ No network issue still unable to ping or telnet(Hint ‐ netstat) - DevWithNehaCloud/Oracle-Cloud-Infrastructure-wiki GitHub Wiki


📋 1. Scenario Overview

The lab environment consists of two cloud instances configured to test network connectivity and application accessibility:

  • Source Server (User App Server): Used to access the application and initiate connectivity tests.
  • Destination Server (Prod App Server): Hosts the web application and services requests on Port 80.

❌ 2. Issue Description

  • Problem: The User App Server is unable to establish a connection to the Prod App Server over Port 80.
  • Initial Symptom: Running a telnet command from the source server resulted in a "Connection Refused" error:
    telnet <Destination_IP> 80
    # Output: Connection refused
    

🔍 3. Troubleshooting Workflow & Root Cause Analysis

To resolve the issue, a systematic troubleshooting approach was followed to identify whether the blocker was at the Application layer, OS Firewall layer, or Network/Cloud Security layer.

Summary of Actions Taken:

  1. Service Verification: Checked if any application was actively listening on Port 80 using the netstat command.
  2. Service Remediation: Discovered no web service was running; installed and started Apache Web Server (HTTPD) to listen on Port 80.
  3. Cloud Security Alignment: Configured OCI Ingress and Egress Security Rules to permit traffic over Port 80.
  4. OS-Level Firewall Update: Added Port 80 to the Linux host firewall (firewalld) to allow incoming connections.
  5. Final Validation: Verified that the telnet connection successfully established from the source to the destination server.

🚀 4. Step-by-Step Implementation & Commands

In this scenario, the user is unable to connect to the application server using its IP address on port 80.

Note: Before performing any troubleshooting steps, check the Network Path Analyzer to identify where the connectivity issue is occurring.

There are three main steps to resolve this issue:

Step 1: Verify Application Status

First, check whether the application is running and actively listening on port 80 on the server. This confirms that the service is available and ready to accept incoming connections.

netstat -plan | grep -i 80

As we can see, the application is not running and is not listening on port 80.

Next, we will check whether the application service is running and functioning correctly.

systemctl status httpd

If not, we will start the application.

systemctl start httpd
systemctl status httpd

Now application is active.

Now, verify again whether the application is listening on port 80.

netstat -plan | grep -i 80

application is now listening on port 80.

This completes the first troubleshooting step. Now run the Telnet command again to verify whether the application server's IP address is reachable on the specified port.

telnet 10.0.0.126 80

If not, proceed to the next step.

Step 2: Verify Network Firewall Rules

Check the subnet's Security List and confirm that an ingress rule for TCP port 80 exists on the destination server.

If the rule is missing, add:

An Ingress Rule on the destination subnet allowing TCP port 80 from the source subnet CIDR. An Egress Rule on the source subnet allowing traffic to the destination subnet on TCP port 80.

This ensures that traffic is permitted in both directions.

This completes the second troubleshooting step. Now run the telnet command again to verify whether the application server's IP address is now reachable on the specified port.

If not, proceed to the next step

Step 3: Review the Application Server Firewall

Run the following command to verify whether port 80 is allowed through the server firewall.

firewall-cmd --list-ports

As we can see, 80 port is not added

Now, add port 80 to firewall and reload the firewall configuration.

firewall-cmd --permanent --zone=public --add-port=80/tcp
systemctl reload firewalld

Now, run the firewall status command again to verify that port 80 has been successfully added and is allowed.

firewall-cmd --list-ports

Finally, run the telnet command again to confirm that the application server's IP address is reachable on port 80.

telnet 10.0.0.126 80

Now successfully connect to the destination server's application on port 80.