CategoryLinux Administration · Networking · Troubleshooting
ToolsRocky Linux, nmcli, ip addr, ip route, Xen Orchestra, SSH
RoleDiagnosed and resolved the connectivity issue independently
StatusResolved
Root CauseNetworkManager connection profile existed but was inactive - no IP assigned to eth0

Initial Situation

The goal was to restore connectivity to a Wazuh SIEM server running in a virtualized lab environment after all connection attempts from the analyst workstation failed. The server at 172.22.3.49 was completely unreachable - ping, SSH, and browser access all returned errors.

Every connection method failed from the Windows analyst PC (172.22.2.119):

Windows analyst PC - 172.22.2.119
ping 172.22.3.49 Destination host unreachable. ssh shamar@172.22.3.49 ssh: connect to host 172.22.3.49 port 22: Connection refused # Browser access to https://172.22.3.49 - also failed

The objective was not simply to restore access, but to identify the root cause through methodical investigation. The failure could stem from any layer: the VM power state, network interface configuration, IP assignment, routing, firewall policy, or a failed service. Each possibility had to be systematically ruled in or out before applying a fix.

Initial Hypotheses

Before taking any action, several possible causes were considered:

  • VM is powered off or in a suspended state
  • VM is running but has no IP address assigned to its network interface
  • Incorrect network interface configuration or missing routing table
  • VLAN or subnet separation between the analyst workstation and the server
  • VM attached to the wrong virtual network in the hypervisor
  • Firewall policy blocking inbound connections
  • Required service not running on the server

Rather than applying fixes at random, the investigation followed a structured layer-by-layer approach: power and VM state first, then network interface, then routing, then service availability. Each layer was confirmed before moving to the next.

Step-by-Step Investigation

Step 1 - Verify connectivity from the analyst PC:

Windows - ARP and routing verification
arp -a # Shows cached MAC-to-IP mappings - useful for confirming # whether the PC has seen 172.22.3.x devices at all route print # Confirms routing table - PC is on 172.22.2.x subnet # Server is on 172.22.3.x - same /22 mask, should be reachable

Step 2 - Check the virtualization platform: Logged into Xen Orchestra (XOA), the hypervisor management interface. Located the server VM in the VM list.

Discovery: The VM was powered off. Started the VM through Xen Orchestra.

After the VM powered on, connection attempts still failed. "VM powered on" ≠ "network reachable."

Step 3 - Access the VM console: Opened the guest OS console directly in Xen Orchestra - bypassing the network entirely. Logged in as user shamar on Rocky Linux.

Rocky Linux (wazuh1) - console access
whoami shamar hostname wazuh1 sudo -l User shamar may run the following commands on wazuh1: (ALL) ALL

Step 4 - Check network interface:

ip addr - interface inspection
ip addr 1: lo: <LOOPBACK,UP> mtu 65536 ... inet 127.0.0.1/8 scope host lo 2: eth0: <BROADCAST,MULTICAST> mtu 1500 ... # No inet line - no IPv4 address assigned to eth0

This confirmed the problem: the network interface existed and was recognized, but had no IP address.

Step 5 - Check routing table:

ip route
ip route # No output - routing table completely empty

Step 6 - Check NetworkManager:

NetworkManager status
nmcli device status DEVICE TYPE STATE CONNECTION eth0 ethernet disconnected -- lo loopback unmanaged -- nmcli connection show NAME UUID TYPE DEVICE eth0 ... ethernet -- # Profile exists but DEVICE column shows "--" (not attached) sudo nmcli connection show eth0 | grep ipv4 ipv4.method: manual ipv4.addresses: 172.22.3.49/22 ipv4.gateway: 172.22.0.1 ipv4.dns: 172.22.0.1,1.1.1.1

This was the key discovery. The network configuration was correct - the static IP, gateway, and DNS were all properly set. The profile simply wasn't active.

Root Cause

Root cause: The Wazuh VM contained a valid, correctly configured static NetworkManager connection profile for eth0. The profile existed and had the right IP address, gateway, and DNS. However, the profile was not active - NetworkManager was not applying it to the physical interface. This left eth0 with no IPv4 address, an empty routing table, and no gateway. All connection attempts failed because the server had no way to communicate on the network.

This is a common scenario in virtualized environments: a VM is cloned or restored from snapshot, or reboots and the connection profile doesn't automatically activate. The interface exists, the config exists, but nothing connects them.

The Fix

Activating the connection profile
sudo nmcli connection up eth0 Connection successfully activated (D-Bus active path: ...) # Verify IP assignment ip addr show eth0 inet 172.22.3.49/22 brd 172.22.3.255 scope global eth0 # Verify routing table restored ip route default via 172.22.0.1 dev eth0 proto static metric 100 172.22.0.0/22 dev eth0 proto kernel scope link src 172.22.3.49

After activating the profile, the server was immediately reachable from the Windows analyst PC. The dashboard became accessible at https://172.22.3.49.

Making the Fix Persistent

After verifying the fix worked, the server was rebooted to confirm the network would remain active. It didn't - the same problem reappeared after reboot. The connection profile was not set to autoconnect.

Set autoconnect - survives reboots
sudo nmcli connection modify eth0 connection.autoconnect yes sudo nmcli connection up eth0 # Verify nmcli device status eth0 ethernet connected eth0

With connection.autoconnect yes set, the NetworkManager profile activates automatically at boot. The server remained reachable after subsequent reboots.

Why this matters: A fix that doesn't survive a reboot isn't a real fix - it's a temporary patch. In a real environment, a server that loses its IP after every reboot would create recurring incidents. Always verify fixes persist through the restart cycle.

Skills Demonstrated

Methodical Troubleshooting Linux CLI NetworkManager / nmcli ip addr / ip route Rocky Linux Xen Orchestra VM Console Access Static IP Configuration Routing ARP Virtualization SSH Sudo / Privilege Management Root Cause Analysis