Is it possible make requests to the server from another network - azure

To elaborate more on the title, (that I know is confussing, I would appretiate if someone make it better)
I need to connect a PC that is off the office to the server that is being hosted on azure,
but only the calls being made from the office IP are trusted by the server.
I need to be able to connect to it from of the premisses, on my laptop.
Is there any way to do this, with a vpn or something like that?

I think the easies way to achieve your goal without exposing VM to public Internet is Point-to-site VPN:
You add and configure a VPN gateway on Azure Virtual Network where VM is placed
You allocate a private address space to Point-to-site connections and authorize its IP range at VM level (Security Group, Firewall or any other method that you use to protect the traffic in Azure)
You install a VPN client on your laptop and connect to VM with it's private IP address

Related

How to use another machine within Azure P2S VPN as a gateway?

I have configured Azure P2S IKEv2 VPN and downloaded the VPN client (in machine it shows as PPP adapter) into 2 machines, one each in different countries. Say our IP addresses are 170.10.10.121 & 170.10.10.122 . From here on we'll call the site with .121 machine as site A.
My machine(.122) would like to use (.121) as a gateway, so that I could browse the internet in my computer using site A's public IP address. Is this possible or have I got this terribly wrong?
My end goal is that, we have multiple sites(B,C,D) that'd like to use the internal network as well as access public internet using site A. This site has dynamic IP address for public internet and port forwarding is not an option as ISP is non cooperative.
As shown in the below picture, machines PC-B-1,C-1,D-1 are trying to use the PC-A-1 as a gateway to access the internet through Site A.
Thanks.
what you need to do is installing the P2S on all PCs in all sites and setup a FW/NVA in Azure and route the traffic through that one or setup S2S from all sites to Azure and route the traffic to a FW/NVA in Azure. Basically you will need a NVA/FW in Azure to get the same IP for all computers. You cant use a P2S as a gateway.
Prefered solution is to setup S2S VPN with NVA to get the same IP.
So this is the setup I am using as a work around.
Since setting up a S2S is not an option for lack of infrastructure and lack of time,
As given in the question, I installed P2S VPN agents in all the machines that is involved, from the machine whose internet we wanted (in site A) to be used by others, to all the other machines (in B,C,D). Now that all the machines are in Azure Vnet, I installed WinGate application at Site A machine and activated proxy.
Then I configured proxy on the rest of the machines in sites B,C and D to proxy through the machine in Site A using its Azure Vnet ip address.
Machines involved are all Windows 10.
This might not be the best solution, but given the extraordinary list of limitations definitely this was the quickest and easiest.
Let's see if we can get better and quicker solutions for the same :)
Meanwhile thanks for all the suggestions :)

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.

Prevent client from using internet via my RRAS VPN

I have a windows server 2016 running in Azure with RRAS VPN + NAT.
I use this RRAS VPN to be able to RDP to my other VM's in the virtual network.
However, when I connect my client (windows 10) computer to the RRAS VPN, my internet will stop working on the client (because internet access is blocked on the RRAS VM).
How can I prevent the client from trying to use the internet that my RRAS VPN VM provides? I tried disabling the use-default-gateway checkbox, but then I can no longer connect to my other VM's in the virtual network.
Thanks!
According to this link it seems that when you disable the "use-default-gateway checkbox" that the default routes are not added to your machine. In specific:
If “User default gateway on remote network” is turned on, the VPN client on successful VPN tunnel connection adds the default route on VPN interface with highest precedence. This way all the IP packets (except those destined to local subnet) go to VPN server. If this parameter is turned off, the default route is not added on VPN tunnel. This scenario will require user to add specific network specific route on the VPN interface – in order to reach the corpnet resources
So, you are left with editing your routes manually to ensure that they work. You can do this pretty easily in windows by working with the route table. The following article gives the basics of how to set this.
Essentially you will want to run something like this:
route ADD <azure network> MASK <azure mask> <azure gw ip>
After you have done this, you should be able to use the internet (via your local configuration) and access to your Azure servers (via the route you created above).

connect non domain joined PC to a single Server in Azure

I have an application that different clients will connect to on Azure. Each of my customers needs to connect to their Corresponding own Server ONLY in Azure from their local networks.
What kind of connection (P2S,S2S) can i create from each of my customers PC to connect ONLY with their Server in Azure?
According to your scenario, I think P2S is better for you.
Site-to-Site configurations are between your on-premises location and Azure. This means that you can connect from any of your computers
located on your premises to any virtual machine or role instance
within your virtual network, depending on how you choose to configure
routing. This type of connection relies on an IPsec VPN appliance
(hardware or soft appliance), which must be deployed at the edge of
your network. To create this type of connection, you must have the
required VPN hardware and an externally facing IPv4 address.
If my understanding is correct, your customers clients are not in one location, they have different private IP. Based on my knowledge, you could not use S2S VPN.
Point-to-Site configurations let you connect from a single computer
from anywhere to anything located in your virtual network.
P2S VPN does not require a VPN device. It is better for your scenario.
More information about difference between a Site-to-Site connection and Point-to-Site please refer to this link.

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.

Resources