Hello there.
Based upon the information provided you want to configure firewall polices in intune.
To get started, Open the Microsoft Intune admin center, and then go to Devices > Windows > Configuration profiles > Create profile > Choose Windows 10 and later as the platform, Choose Templates, then Endpoint protection as the profile type. Select Windows Defender Firewall.
Please check
https://video2.skills-academy.com/en-us/mem/intune/protect/endpoint-security-firewall-policy
And see if it helps,
Thank you
--If the reply is helpful, please Upvote and Accept as answer--