I am developing a TCP Application. My administrator has blocked TCP listening on my Windows PC. So, I am using an Ubuntu 20.04 VM on the virtual box for developing and testing my TCP server application.
I have tested my TCP Application server with the client from localhost. However, I need to test from the actual client system. In my case, it is an embedded system like Android Phone.
Before testing my actual TCP application, I am trying to test the setup with tools as below:
#On ubuntu VM to run sample TCP server
ncat -l 9090 -k -c 'xargs -n1 echo'
#On Android phone, I am using an app from the play store called TCP/UDP TEST TOOL
___________________________________
| _______________________ |
| | TCP_Server:9090 | |
| | Ubuntu VM | | ________________
| | (Bridge iface) | (iface)| <Ethernet Cable> | |
| | IP: 192.168.66.11/24 | | |-> <Ethernet to USB-C covertor> | Android Mobile |
| |_______________________| | |________________|
| | IP: 192.168.66.12/24
| Win 10 PC(IP: 192.168.66.50) | GW: 192.168.66.11
|___________________________________|
The problem is, the Android phone is unable to ping and connect to the TCP server on Ubuntu VM, But the reverse s working; Ubuntu VM could able to ping the Android phone and able to connect to a sample TCP service on Android Phone.
I connect my Ubuntu VM (bridged wifi interface) and Android phone to a Wifi router; The TCP client-server communication is working fine wherever I run client and server.
I have checked firewall rules on Ubuntu VM, they were empty with ACCEPT policy for Input, Forward, Output chains.
From Win 10 Host OS, I could ping IP of both VM(192.168.66.11) and Android Phones(192.168.66.12)!