Hi @ALAHMADI, TURKI YOUSEF S ,
What's the specific meaning of the "block IP"? Would you like to prevent the users from accessing the server from any specific IP or block the messages sent from those IP?
And do you have a list of bad reputations that need to be blocked?
If you would like to avoid spam, it's recommended enable the anti-spam functionality and configure Sender reputation procedures in exchange to meet it. Sender reputation is part of the Exchange antispam functionality that blocks messages according to many characteristics of the sender, about how to set it, please refer to this document: Sender reputation procedures.
If that's not your case, please feel free to post back.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.