Can't ping host machine from VM
Description
I've got a stupidly architected container app that can't separate concerns properly that tries to do internal API calls over the same address external ones go through.
This is incredibly stupid of course but it should still work. With colima however, it doesn't: I'm unable to reach my host via its external IP address which also means the app can't. I get internal API calls working or external ones and I need internal ones to be working for external ones to make sense.
Version
Colima Version: 0.4.4 Lima Version: 11.1 Qemu Version: 7.0.0
colima version 0.4.4 git commit: 8bb1101
runtime: docker arch: aarch64 client: v20.10.17 server: v20.10.11
Operating System
- [ ] macOS Intel
- [X] macOS M1
- [ ] Linux
Reproduction Steps
colima sshping <ip of host>(i.e. 192.168.178.116)
Expected behaviour
It should respond to pings and other network traffic.
Additional context
No response
The Lima VM is on its own subnet, iirc something like 192.168.0.5. I wouldn't be surprised if there is no route to your 192.168 1.xxx IP.
You should be able to add such route either with the ip command or through the Lima configuration files (this isn't a Colima problem as you might have guessed, but a Lima misconfiguration on your side).
How would I go about doing that?
I'm unable to reach my host via its external IP address
What do you mean by external IP of the host? Within the LAN or publicly reachable over the internet?
Within the LAN; the host's interface's address.
The host is available at fixed IP address 192.168.5.2 and both host.lima.internal and host.docker.internal hostnames.
Is there a way you can configure that? The VM is totally oblivious of the host IP address.
Neither of those are going to work both in the VM and the host.
I need to be able to access the same address from my browser, another device and from inside the VM.
It might be doable, but it will require the user to specify specific IP address(es) that basically maps to the host IP.