Azure Permanently whitelisting IP - azure

Hope you are all safe!!!
I have a live project running on Azure Environment.
As part of data checking when i tried to access the Database using the SSMS in my machine, Everytime I need to white list my IP.
Since it is an intranet domain IP changes everyday.
Is there any solution to permanently enable my IP using mac address or something. So that i can jump over this IP Whitelisting.

IP whitelisting (as the name already suggests), does not work on MAC address basis. What you could do as an alternative is to use a Point-to-Site VPN from your machine into an VNET in Azure. Then you should be able to leverage Private Endpoints (aka Private Link) to allow connections to your database from that VNET. https://samcogan.com/service-endpoints-and-private-link-whats-the-difference/

Related

How to access localhost:8089 on Azure VM from my local pc's browser?

I have an azure vm with gitlabrunner + locust on it for performance testing. Is it possible somehow to access VM's localhost:8089 from browser on my local pc?
I don't know if it matters that it's running in a GitLab Runner. I'm not familiar with that. But here's a link to doc for how to open ports on an Azure VM.
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal
And an SO answer about how to get a VM's IP address.
Easier way of retrieving an Azure VM's Public IP address
You'll need to make sure the VM has the 8089 port exposed and then you need to be able to connect to the IP address (whether public or behind your VPN or whatnot).

How to connect to an Azure SQL Server using the PrivateLink IP

I have an Azure logical SQL server to which I added a Private Link, the NIC is attached to an existing vnet\subnet. Our company's VPN is linked to that vnet and I can see other devices on the private link's subnet but not the SQL Server.
The SQL Server is reachable on the public URL (temporarily for testing) but trying to ping or tracert the server with the private IP fails, I can ping and tracert to other VMs on the same subnet.
I'm not using a custom DNS zone because it's imperative that we configure it with the IP and I haven't made any changes to our company DNS (I'm expecting not to have to).
Other than creating the private link and attaching it to the SQL Server, what else needs to be done? What am I missing?
I'am working on the same Issue. It's still not solved yet but there are some steps you need to do.
For the Connectivity it's required to add a DNS, especially if you want to connect from the On-Prem. Azure has a default DNS-Solution for Azure-Resources. The Problem is: From On-Prem you can't access the default Azure-DNS-Service.
So you have to configure a DNS-Zone (in Azure or On-Prem).

How to make your IP address stable?

The Problem
I'm trying to understand more about networking, firewalls, and IP ranges to help me solve a few real-life problems. The problem I ran into is that the SQL server I'm connecting to has a firewall which can list individual IP's or IP ranges, but my ISP changes my IP fairly frequently, which means that whitelisting my current IP is a temporary solution and I'll eventually be disconnected.
The Question
If I wanted to stabilize my IP and make it so that it comes from a predetermined range (or even a single static IP), would the best way of doing that be to make a virtual network that I can VPN into that has a specified range of IP's? Or is there any easier solution?
Details
I'm interested in the answer at a broad level, but the specific database I'm connecting to is on Azure. Hence, my thought process would be to create a Virtual Network and and a Virtual Network Gateway, which I would connect to using a standard VPN connection tool like Hamachi or Open VPN. I'm assuming then that I could open up a tool like PGAdmin and connect to the database, because the database would consider the incoming connection to be from the IP range that I've whitelisted and that the Virtual Network sits on. Is this accurate?
As you stated, if there is a public IP range from your on-premise outbound traffic, you just need to whiltelist the IP list on the firewall of Azure SQL database server. It is a simple method.
If you want to block the public endpoint from on-premises machines, you can use private endpoint for Azure SQL database. Read On-premises connectivity over private peering for more details.
With Private Link, customers can enable cross-premises access to the
private endpoint using ExpressRoute, private peering, or VPN
tunneling. Customers can then disable all access via the public
endpoint and not use the IP-based firewall to allow any IP addresses.

Enable local Internet when connected to Azure VPN via VPN Client

I have an Azure (Classic) VNet with Point-to-Site enabled. I went through uploading a certificate and downloading the VPN Client. When I connect to the VPN, I am able to access all my resources fine, but this disables my local Internet access.
I found and went through this article which seemed applicable (if very cumbersome): http://www.diaryofaninja.com/blog/2013/11/27/deconstructing-the-azure-point-to-site-vpn-for-command-line-usage
I am unable to connect using the custom connection I created with it as it tells me the certificate is incorrect (though the .pbk it is based off works fine).
I suppose I could jump through some hoops to get internet to pipe through the VPN, but I really don't want that. I need to be able to hit the VMs in my VNet from an application that I am running locally, and I want to be able to pull the CDNs in over my local internet connection.
This shouldn't be this hard, should it?
Thanks,
~john
Have you ensured that the VPN address range you have defined in Vnet doesn't overlap with your LAN IP ranges? Say if your local workstation has private IP range in 192.168.x.x range, you can try setting VPN address range in 172.16.x.x range.

How to configure my Azure VM Endpoint ACL to allow connection from my Azure Webjob on the same portal

I have a WebJob on an Azure Website that needs to connect to a VM Endpoint to make REST calls.
My Endpoint is configured to deny all except my company's IP range. Now what rule would I need to add or url should I use so my webjob can connect to the endpoint?
I have tried the following without success:
Allow my website virtual IP address in the ACL
Connect to the endpoint using the internal IP instead of the DNS without changing
the ACL
Connect to the endpoint using the public virtual IP instead
of the DNS without changing the ACL
This works but is not what I am looking for:
Remove the current ACL and allow all
Keep the ACL but add a /16 rule with my website IP
Thank you for your help, and let me know if you need precision!
I need the same thing but it seems as though is not possible right now. Looking at this answer on a related question:
Azure Web Sites do not have dedicated outbound IP addresses for each
deployment. This precludes you from using ACLs or Virtual Networks to
connect to your Redis / Solr virtual machines.
So even though you can have a (reasonably) fixed incoming IP address on Azure Websites, the outgoing address is highly unpredictable and as far as I can see, the only exclusion that you could make was to restrict it to the entire range of IP addresses for that data centre which is far from ideal.
A solution moving forward will be to connect your Azure Website and the VM on the same Virtual Network. As of my writing this it is still in Preview so it still is not ready for production use just yet.
Here is more information on it: http://azure.microsoft.com/blog/2014/09/15/azure-websites-virtual-network-integration/

Resources