0
I want to establish a connection over a network protocol like TCP/UDP using Netcat with my Debian virtual machine (using VirtualBox) as the host while my Raspberry Pi connects to the virtual machine.
I can connect to my Raspberry Pi from my virtual machine but not the other way around. My Raspberry Pi can't detect the open port with Nmap but my virtual machine can detect it's own open port so I'm confused. I might reinstall the Debian virtual machine to see if that fixes it.
Commands I executed:
Debian virtual machine on my Windows PC:
nc -l -p 6565
Raspberry Pi:
nc 127.0.0.1 6565
My computers are on the same router and the connection 127.0.0.1
to my Raspberry Pi works but not the other way around.
Say what? Please [edit] your post and provide clear detail about what you are trying to accomplish, clearly identify the number and type of devices/computers we are talking about, describe your network topology / how things are connected together, and specifically what commands you ran on which devices. – Appleoddity – 2019-02-03T06:52:09.630
Sorry I'll edit my post to be more clear – dragonking3002 – 2019-02-03T06:52:54.750
Still not clear. Is your virtual machine connected via bridge mode? – davidbaumann – 2019-02-03T08:18:46.077
I tried both bridged adapter and NAT – dragonking3002 – 2019-02-03T08:36:17.403
This is definitely still not clear. Are the raspberry pi and the Debian virtual machine two different physical machines? You’re using 127.0.0.1 as the address in your command. You need to put in the IP address of the Debian server. – Appleoddity – 2019-02-03T14:17:42.310
My debian virtual machine is on my windows PC and my raspberry pi is a standalone computer. They are connected on the same network and I've been able to connect via 127.0.0.1 to my raspberry pi but not vice versa. when i try to probe my debian server's ipv4 with nmap it said the host is down or refusing calls – dragonking3002 – 2019-02-03T17:36:53.970
Virtual machines don’t network into the machine unless they are configured to. You might need to set up a second virtual NIC on the VM or easier is to allow the VM to get an IP address from your network’s router. – JakeGould – 2019-02-03T17:44:41.143
how would I go about doing that? also the virtuabox has the following network options in the options menu; 1: not attached, 2; Nat, 3: Nat network, 4: bridged adapter, 5: internal network, 6: Host-only adapter, 7: Generic driver – dragonking3002 – 2019-02-03T18:20:09.293
@dragonking3002 Switch to bridged mode and it will make the VM a separate device on your overall network as if it was a real machine connected to it. Then the Raspberry Pi can find and connect to it. More details can be found here.
– JakeGould – 2019-02-04T01:58:10.787I selected that option and my open port still cant be detected outside of my virtual machine – dragonking3002 – 2019-02-04T05:05:18.953