Block all my lan

Hi everyone, I am blocking ALL access from a network (filter rules - Action = drop; Chain Forward) but I want to give access to certain pages and services.
In layer7, I create the webs that I want to allow and in filter rules - action = accept; chain = forward; layer7 protocol = youtube.
Everything correct, but the problem is, I want to give access to ALL teamviewer. I have to open * .teamviewer.com and I don’t know how to do it since there are many ip’s. If I put www.teamviewer.com in address list, it doesn’t work.
Can anyone think of how to do this? THANK YOU

This is difficult to accomplish. You could research what DNS names teamviewer uses at first (allow all, start teamviewer, and quickly look in your DNS cache), but it could change next week and not work again.
Same for “allowing websites” or other services. It will be a constant battle against changes and subtle problems.

Better to not try to achieve such goals, and move the problem somewhere else (e.g. to a contract with the people involved “you can only use the network for …”).