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?