TCP Server on Computer. No connection established

289 views Asked by At

I have 2 devices on the same network and I want to communicate via TCP on the same network. Device 1 is a computer running a Debian OS on virtualbox, and another is an android tablet. Interesting enough, my tablet acts as a server no problem via an app. Any other device on the same network can connect to the tablet. The computer on the other hand is not so cooperative. Running netcat -l -p 6667 on my computer should allow incoming connections to communicate with my computer via TCP on port 6667, but this is not the case. Netcat opens a socket but I can't connect to it in anyway. Is there an underlying reason as to why this does not work? All device are under the same router. I have disabled firewall on my computer as well.

1

There are 1 answers

1
smushi On BEST ANSWER

From your information, i would say your problem is you need to set up port forward.

VirtualBox and VMware both create virtual machines with the NAT network type by default. If you want to run server software inside a virtual machine, you’ll need to change its network type or forward ports through the virtual NAT.

here is a guide that will show you how to Forward ports to virtual machine