macos – What is the exact equivalent of this netsh Windows command for MAC? The command is attached in the body

As a newcomer to Apple OS. Welcome and it’s great to be a beginner, so much to learn and asking for help is a smart move.

Start with the firewall general help is my advice.

Once you know what you want, a follow on question might work on how to lock this down, whether you use MDM or configuration profile or make a user not an administrator so they can’t change a setting you as the administrator set.

P.S. there is no exact equivalent as the systems are architected differently.