What I'm trying to do is to reach a specific IP address from a VirtualBox guest with host-only networking in another subnet. I want to keep the guest machine isolated (not reachable from outside except for that specific IP and more important no internet access). I'm not sure if that is possible at all since it is called "host-only" network and maybe there is another, better solution for this - I'm happy about any type of advice.
This is my current setup:
Host machine A (Ubuntu 14.04):
eth0: 192.168.0.100, gateway 192.168.0.1
vboxnet0: 192.168.56.1
Guest machine B (Windows 10) with host-only adapter:
192.168.56.101, gateway 192.167.56.1
Another machine C:
192.168.0.101
What I need is that machine B can reach machine A and C but no other machines/network or internet. I can currently ping the host machine A from the guest machine B via ping 192.168.0.100
but not machine C. I tried creating a route on the host machine A using the command
ip route add 192.168.56.101 via 192.168.0.100 dev eth0
but ping from B to A won't work after doing this.
Edit: It is now clear to me that creating a route on the host dosn't make sense and is the wrong approach for this question.
I have to admit that I am not a network expert and therefore I am happy about any kind of feedback.