How to only open .ir sites ?

Hi friends. I need a solution to open only .ir domain sites. block all ( .com .org .net … but only access to .ir ) please help me

I wanted to write: Use proxy, like squid. However, in case the user opens https-tunnel, or uses VPN, then …

No ! I need it in mikrotik hotspot

How about using the built in DNS and put in a regex that resolves 127.0.0.1 for everything but the .ir TLD?