During the deployment phase of my project Distributed Pentesting Lab Setup, I encountered a critical networking issue while attempting to establish communication between the attacker machine (Kali Linux) and the target machine (Metasploitable2).
The lab architecture required traffic to traverse multiple layers:
Kali (192.168.1.0/24) → Target Host Machine → VMnet1 (192.168.56.0/24) → Target (Metasploitable2 Juice Shop)
Kali (Attacker)
│ 192.168.1.10
│
▼
Target Host Machine (Pivot)
│ 192.168.1.20 (LAN)
│ 192.168.56.1 (VMnet1)
▼
Internal Lab Network (192.168.56.0/24)
│
├── Metasploitable2 (192.168.56.10)
├── OWASP Juice Shop (192.168.56.20)
└── Windows Target (Optional)
Important Notes:
Despite correctly configuring static IP addressing on the target machine and verifying connectivity between the VMware host and Metasploitable2, Kali was unable to reach the target.
Configuring static IP

Successful ping between the VMware host and Metasploitable2

Attempts to add a route using the VMnet1 gateway (192.168.56.1) failed with:
“Error: Nexthop has invalid gateway”
Switching the route to use the target host machine LAN IP (192.168.1.20) succeeded syntactically (because I could ping the target host machine at 192.168.1.20), but connectivity to the machines hosted in VMware on the VMnet1 host-only network still failed.