In case of SQL Server named instances default configuration in to use TCP port which is dynamic and determined at the time the Database Engine starts.
The SQL Server Browser service listens for incoming connections to a named instance and provides the client the TCP port number that corresponds to that named instance.
I also understand a named instance can use a static port and in those case you can just open that port in your firewall.
What ports you open when using dynamic port for named instance and hosting multiple named instance in the same host?
Do you open the whole dynamic port range for TCP/UDP 49152–65535?