In general, TeamViewer will always work if surfing on the Internet is possible. Hence, no firewall configuration is required.
As an alternative to port 80 HTTP, port 443 HTTPs is also being checked. In addition, it is also possible to open only port 5938 TCP on the outgoing side (required for mobile connections). Data traffic should then be able to pass through on this port without any problems.