I created a SQL Server trigger that blocks or allows remote connections based on IP address — without blocking port 1433 or stopping the SQL Server service. This trigger helps control remote access while keeping the benefits of TCP 1433 connections.
just RUN this Trigger and u can edit the @ip for the machine can connecte with sql server
https://github.com/ozstriker712/BLock-Allow-IP-adresse-for-Remote-Connection-SQL-SERVER