Is there a way to block ports when using my Android device as a hotspot? I often use my Android as a hotspot.

I would like to block port 25 for all devices using my hotspot.

Is this possible with Android?
Your best option is to use NMAP through your computer. Make a hotspot, connect your PC to it, use NMAP and ipconfig. Not sure if that works, but there isn't any other alternative as far as I know. In theory, there are some firewall apps, but those rarely work as intended, and you are much better configuring your Android ports through PC.