2
I'm on a protected network which only gives IP addresses to registered devices. I can register my laptop, a Windows machine, and a RPI, but not every VM on that laptop, so bridged adapter is not an option, I think. I'd like to be able to communicate between the RPI and the VM.
So far I have tried this:
I have 3 entities: (1) A Windows host, with IP 134.58.46.117 (2) A Virtualbox Linux Guest VM, configured, atm, with NAT network and a Host-only Adapter. it has IP 10.0.2.15 on eth0 and IP 192.168.56.102 on eth1 (3) a RPI on Jessie, with IP 134.58.46.172 on eth0.
I can ping 192.168.56.102 from the Windows Host. I can ping the Windows Host from the RPI. I can ping the RPI from the Windows host. I have configured the RPI with the following route:
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.56.0 134.58.46.117 255.255.255.0 UG 0 0 0 eth0
When I ping the VM from the RPI ( so execute "ping 192.168.56.10"), I receive no response.
Wireshark on the Windows host does detect packets from 134.58.46.172 with destination 192.168.56.102 however, but nothing is returned.
Any clue what the issue is? Or another way to do what I want?
Thanks for the reply. I am having issues with step 1 for Windows 10: enabling Routing and Remote Acces auto-disables with the following message: "the routing and remote access service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs."
Any way you can help me out? – Sven – 2017-06-01T09:09:48.657
Also, doing the second step, with the command: " sudo ip route add 134.58.46.172/32 via 134.58.46.117" gives me "RTNETLINK answers: Network is unreachable" – Sven – 2017-06-01T09:11:57.313
Point2: it is indeed the wrong IP address, the vBox Host-only IP is 192.168.51.1 is better.
Point1: I did see that but it is not applicable. Looking further, I encountered "https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_web/rras-unable-to-start-service-windows-10/90bd99b9-02d7-434a-9aab-38d59dfa809e"
Appears this might be a Windows 10 bug! Which is unfortunate. Any clue on how I can fix it? Or work alternatively?
@Sven give your Linux guest a fake MAC address, one which has access to your LAN. Use the RPI to listen on conversations, with tcpdump -i eth0 -n arp. This will display a number of MAC addresses which are present on your net. Change the MAC address of your Linux guest with macchanger, giving it the one you just learned. Now use Bridge adapter for the Linux guest. It will work like a charm. Also, you migh consider getting a pc with a real OS, since what you are trying to do is quite sophsticated. Windows falls short there. – MariusMatutiae – 2017-06-01T10:03:12.270
Unfortunately, it appears it doesn't. Tried it out, it boots with eth0 and the specific MAC I've given (using the vBox settings though) but no IP address, – Sven – 2017-06-01T12:17:12.147
@Sven that's good news: after boot, from within the guest, issue the command dhclient -v eth0, if eth0 is the interface which is used for the bridge adapter. This should do it. When it works, I will teach you how to make this permanent upon boot. – MariusMatutiae – 2017-06-01T14:58:59.620
@Sven Or you may setup a static IP. If you just copy the IP address of the machine from which you borrowed the MAC address, then it should work right away: this is precisely what I do whenever I find myself in a LAN whose security measure is a registration of MAC addresses for all allowed machines (= I am an academic, in case you wonder). – MariusMatutiae – 2017-06-02T07:20:35.787
Seems like it get stuck on DHCPDISCOVER. It prints : "DHCPDISCOVER ON eth0 to 255.255.255.255 port 67 interval 3 (xid=0x578a771d)"
Stealing an IP address is also less than ideal, since wouldn't that interfere with the connectivity of the other guy? – Sven – 2017-06-02T10:37:29.480
It appears, it works! For some reason eth0 is unavailable (though only 1 adapter is active). Any case, with eth1 works like a charm. How do I now make it permanent on boot? – Sven – 2017-06-02T11:49:37.187
@Sven Please read my Edit. – MariusMatutiae – 2017-06-02T12:25:39.233