Acces TTN data from Node-Red hosted in a server

That says:

Add The Things Network nodes

But, don’t, as those are deprecated:

:warning: The support and maintenance for this SDK has been discontinued, it is not recommended to use the SDK for new projects.

Instead, see https://www.thethingsnetwork.org/forum/t/mqtt-in-node-red-howto/39909.

As for firewalls: an MQTT client opens a connection to the remote broker (server) on port 8883 (or 1883 for non-TLS). A client does not need incoming connections.