Is there a way to close all ports using iOS
There should be a "Parental control" option in your router, from where you can set up rules for access.

You don't mention any specific router brand, so I can't give you a specific how-to.