Encrypting connection to SQL Server at an IP address - sql-server

Is it possible to cause SQL Server (2014 or later) to encrypt connections, if that server isn't on DNS (i.e. accessed via IP address)? I understand that an SSL certificate can only be tied to a domain name, but that doesn't always prevent its use without the server being at that domain name, such as via an SslStream.
Thanks

Related

How can I connect to my server without outside ip adress from another network?

I want to connect to my server from another network, my server hasn't got an outside ip adress. I want to reach the sql server from where I host my website. I host my website somewhere else (not in my network).
Your SQL Server will have to be visible to the server from which you host your website.
I'm assuming you want to access the data in SQL Server to generate some content for your website.
There are 2 simple ways to do this:
Static IP - Ask your ISP for a static IP address for your local
network, you can use this in the connection string. This is preferable & more stable, since it will always be in sync.
Dynamic DNS - If your ISP won't give you a static address or you don't want to pay for it. You sign up with a DDNS service provider, they give you a domain name, like ferrysqlserver.ddns.org, and your network is visible to the internet via that name. Some routers support DDNS, otherwise you may have to run a service application that keeps your external ip address in sync with your DDNS provider.
Once you have either of those working, your network is now available to the internet, but nothing is likely accessible.
What you have done so far is to create a path from an internet name to your local router.
To make SQL Server accessible, you need to find out which ports your SQL Server uses (default is 1433). It's possible you may need to open other ports as well if you connect to SQL in a different way.
On your router, find the port forwarding options, and enable port forwarding to the local network ip address of your SQL Server, for port 1433.
This step maps connections from the internet to port 1433 of your router, and forwards those connections to port 1433 of your SQL Server.
Good luck.

Paramters Needed to access MS SQL Database from Ubuntu

So I've been working on this for a few hours now and have made no progress. I know this may be an easy/stupid question, so I apologize in advance for my extreme lack of knowledge here.
I have a MYSQL 5.7 database in which I am trying to push to a MS SQL 2008 database. The MYSQL database is local on my Ubuntu 16.04 machine. I have configured FreeTDS to try and do this.
The issue is the person only gave me these parameters which I believe are incomplete.
Server Address: database\SQLEXPRESS
User Name: DatabaseUser
Password: datapassword
Databasename: DBName
Don't I need an IP address/web address and a port to connect? It seems that the "string\SQLEXPRESS" format is not an actual server address (or may be for people who are on the servers network).
Additionally, since the MS SQL Sever is run on a windows machine, will I need my IP address to be white-listed, or does this depend on how the server was set up?
SQL Server addresses are specified via an IP address or hostname, followed by an (optional) instance name. The point of instance names are to differentiate between different instances of SQL Server on the same machine. Regular, non-Express versions of SQL Server don't have an instance name by default, so you should be able to just specify the server's IP or hostname in the address field:
Server Address: 192.168.0.1
SQL Server Express's instance does have a name by default, SQLEXPRESS. If you know you're connecting to a SQL Server Express instance, then most likely you're looking for
Server Address: 192.168.0.1\SQLEXPRESS
As far as connecting to the server, yes, the server needs to be reachable via TCP/IP from the client, so that presumably depends on your network setup.
You also need to enable remote access to the server. This setting is exposed in Management Studio -> Connect to server -> Right click on server, Properties... -> Connections node -> Remote server connections -> Check "Allow remote connections to this server". You might have to do this from a SQLMS instance on the server.
You also need to make sure that your preferred connection protocol (Shared Memory, Named Pipes, TCP/IP) is enabled. You can do this via Sql Server Configuration Manager, which should be installed on the server. Open it, then SQL Server Network Configuration Node -> Protocols for -> Enable or disable the protocols as desired.

Azure Inbound security rules not working for fix Source port

I am trying to connect SQL Server from local machine.
Following inbound security rule is not working with the fix source port. But it works with * for source port.
What is wrong with this setup?
In SQL, 1433 is the port on the server, not necessarily the port on the client. Depending on the client being used, you may have any random high order port in use to make the SQL connection. Only use 1433 as the source if you know that the app/client you are using uses 1433 only.
Azure SQL Server firewall prevents all access to your database server until you specify which machine or computer have permission to access your database externally, by Allowing IP Address to your Azure SQL SERVER. The firewall grants access based on the originating IP address of your each request.

Cannot Access Name Instance over VPN

I am having an issue connecting to a SQL server instance with management studio over VPN. I can connect to the default instance (i.e. SERVERNAME) over the VPN connection but I cannot connect to another instance on the same server (i.e SERVERNAME\INSTANCE) over the same VPN connection. All of the settings are the same in SQL Configuration manager.
Additionally, I can connect to the named instance just fine from any box "inside" the network. The error I am receiving is a general, "A network-related or instance-specific error occurred... Error 26."
Thanks
EDIT: I should also point out that I can use IPADDRESS to connect, but IPADDRESS\INSTANCE does not work.
To (partially) resolve the situation you need to choose from one of these workarounds when connecting over VPN:
Enable and use SQL Server Authentication instead of Windows Authentication and a static port for the SQL Server instance (always specifying the port value in the connection string);
Use a static port for the SQL Server instance (always specifying the port value in the connection string), enable that TCP port in your server firewalls, and specify the public server name or its external IP address (provided that it is exposed outside the local network);
Enable trust between your source and destination domains (not applicable for connections “on the fly”).
Personally I decided to use the first workaround as it was the easier to implement and the most secure however If the problem persists, verify the server doesn't have an IPSEC policy that restricts access to the SQL Server port via IP address. That also could result in you being blocked.

sql replication using remote server

PI'm trying to do replicate two data bases.
DB in LAN network (Publisher)
DB in virtual dedicated network (Subscriber)
According to my situation, replicate publisher implemented in my server in LAN network.But subscriber is implementing on a virtual dedicated server. i configured router port to my server machine in LAN network.using sql management studio on virtual server, i connected to the db in LAN network.But when i try to create subscriber using virtual server db i can't access to the publisher.(IN LAN network.) it gives errors as below.
"SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, 'BESTLIFE\BESTLIFECROWN'. (Replication.Utilities)"
Please help me to solve this .
You didn't say whether you used the GUI or scripts, but somewhere, a call got made to one of the stored procedures (likely sp_addsubscription) with a server name that doesn't match the actual server name. For instance, the error message above says that the server is called BESTLIFE\BESTLIFECROWN. If that's not the name of the server that you put in as hosting the subscriber, it's not going to work. Whether you need to add a DNS alias or whatever, that's the only value that will work for this setup.

Resources