- Created an instance in GCE, tagged 'tagA'
- Created firewall rule:
tcp:12345, source tag
tagA, target tag
- On the instance executed:
nc -l 0.0.0.0 -p 12345
netstat -an | grep 12345
tcp 0 0 0.0.0.0:12345 0.0.0.0:* LISTEN
Trying to connect internal:
nc -v internal.ip 12345=> 12345 (?) open
Trying to connect external:
nc -v external.ip 12345=> 12345 (?) : Connection refused
According to GCE manual:
sourceTags [Required if sourceRanges is not specified] If the source is within this network and has one of the specified tags, the connection will be accepted. If both sourceRanges and sourceTags are specified, an inbound connection is allowed if either the range or the tag of the source matches sourceRanges or sourceTags.
Can anyone explain why port on external IP is not available with this firewall rule?