During the deployment 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) → VMware Host Machine → VMnet1 (192.168.56.0/24) → Target (Metasploitable2 Juice Shop)
Kali (Attacker)
│ 192.168.1.10
│
▼
VMware Host (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)
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 VMware host LAN IP (192.168.1.20) succeeded syntactically (because I could ping the VMware host machine at 192.168.56.1), but connectivity still failed.
I traced the issue down to a key networking constraint: