Does elastic-agent enrolled in fleet with system integration needs port opened to elasticsearch nodes?

I have a 3 elasticsearch nodes, 1 elastic agent fleet server node, and 8 elastic-agent server. The elastic-agent have custom logs and system integration. I have opened ports from elastic agent to fleet server. Does the elastic agent needs to have port opened to the elasticsearch nodes?

Yes Elastic Agent communicates with both Fleet Server (Control / Policy: Black lines) and Elasticsearch (Data: Pink lines and Monitoring: blue lines) see the diagram in the docs below.

Perhaps take a look at the deployment diagram to help