Tutorial :Netcat anomaly in VMWare/Cygwin/Sockets environment



Question:

I'm happily running Ubuntu Linux in a VMWare box hosted on XP.

My Linux application opens up your basic server socket port, to which I connect netcat (nc) as a client to listen in on the traffic I'm putting on that socket for the "real" clients. All's well.

However, when I open up a Cygwin shell on the XP side and run nc from there it appears to be unable to connect to my application's server socket.

To verify connectivity, though, if I run nc as a server (nc -l -p 3694) in the Linux/VMWare environment, nc on Cygwin has no trouble connecting to it and transferring data back and forth (the IP address is not localhost, it's the one assigned by DHCP).

To summarize:

Linux App      --  Linux nc  : Works  Linux App      --  Cygwin nc : Does not work  Linux nc (svr) --  Cygwin nc : Works  


Solution:1

Which netcat code are you using? At least one variant has known issues...


Solution:2

Is it possible you have the guest network set to NAT and therefore things can't connect to something listening in the VM?


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »