Score:0

Unable to stream data from Google Cloud to local machine

kr flag

I'm trying to stream stdout from a VM on Google Cloud Compute Engine to a local machine using nc:

$ mycommand | nc mydomain.net 12345

And listening on the local machine

$ nc -l 12345 | analysis-script

Port 12345 is open on both cloud VM and local machine using ufw:

ufw allow 12345

ISP is Xfinity and port 12345 is forwarded to the local machine. Just for good measure, port 12345 is also open on the Google Cloud firewall for inbound and outbound. However, nothing is coming through. Testing connection from local machine:

$ telnet clouddomain.net 22
Trying xxx.xxx.xxx.xxx
Connected to clouddomain.net
Escape character is '^]'.
SSH-2.0-OpenSSH_8.4p1 Debian-5

And from cloud VM:

$ ping mydomain.net
PING mydomain.net(xxxxx.hsd1.ca.comcast.net (xxxx:xxxx:xxxx::xxxx:xxxx) 56 data bytes
64 bytes from xxxxx.hsd1.ca.comcast.net (xxxx:xxxx:xxxx::xxxx:xxxx): icmp_seq=1 ttl=36 time=76.4 ms

but

$ telnet clouddomain.net 12345
Trying xxx.xxx.xxx.xxx


fails with no response.

Streaming from another machine within the local network succeeds with no problem.

What am I missing?

John Hanley avatar
cn flag
Notice that your ping command is using IPv6, therefore that is not a good test for IPv4 connectivity.
John Hanley avatar
cn flag
Verify that netcat is listening on all interfaces. You should see 0.0.0.0:12345 in the output. **sudo lsof -i -P -n | grep LISTEN**
seamux avatar
kr flag
Thank you @JohnHanley I ended up having to put the target machine in the DMZ for it to work. Must have been a limitation of the modem software.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.