I cannot change sql server user. How can I restrict in SSMS to allow remote connections only specific IP / HostAddress.
How to restrict in SSMS to allow remote connections only specific IP / Host
ssms
Related Question
- SQL Server 2012 – Connection Issues with OSQL and SQLCMD but Not SSMS
- How to Backup SQL Server Database After Evaluation Period Expires
- Sql-server – How to restrict SSMS to list the database of a particular user (Windows 2012 + Plesk)
- Sql-server – Allow user to create databases on server and to see only the databases that are created by him, without creating login first
Best Answer
SSMS is only a tool that connects to a SQL Server instance. SQL Server listens on a specific IP address for connections. It doesn't really care which tool is connecting.
SQL Server is not like PostgreSQL that has a
pg_hba.conf
where you can restrict connections, nor is it MySQL where you assign permissions to auser@source
combination when creating the user login.Answer
It's not currently possible by using simple means (PostgreSQL, MySQL), but if you are willing to start creating Logon Triggers (Microsoft Docs), then you might be able to build a restriction that meets your requirements.
The SQL Syntax for triggers can be found in the article CREATE TRIGGER (Transact-SQL) (Microsoft Docs). The article lists an example for a Logon Trigger.
Because your requirements are pretty dire, I am unable to provide a solid solution. Please edit your question and provide as much details as possible.
Alternative
You could equally create a blocking firewall rule or hack the routing table on the server / network.