You can configure ipv4 address restrictions for remote connections.
Official doc :
Configure IPv4 Address Restrictions for Remote Connections (IIS 7)
Configure IPv4 address restrictions to specify whether a specific IPv4 address or range of IPv4 addresses are allowed or denied permission to connect remotely to sites or applications on the Web server.
If the answer 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.