Enable local Internet when connected to Azure VPN via VPN Client - azure

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.

Related

Azure VPN client azure active directory authentication

I am trying to implement a azure vpn to have a better understanding of the functionality of this resource.
Following azure documentation here:
https://learn.microsoft.com/en-us/azure/vpn-gateway/openvpn-azure-ad-tenant
I am able to create all the resources and configure the azure vpn client.
I Downloaded the client and azure vpn, and imported the xml file and tried to connect.
Everything worked fine as I was able to login with my azure credential and connect to the vpn.
But here is the bit that I am a bit confused about.
Once the vpn established the connection, I got a IP address. so I thought that if I go on google to check my IP address, I would get the vpn address, but what I am seeing is my personal ip.
So maybe somebody can help me to understand how can I make sure that the vpn I am connecting to is actually working and generating a tunnel connection from my pc to azure AAD?
Please if my question Is not 100% clear, just ask for more information.
Thank you very much for your help
Azure P2S VPN connections do not support forced tunnelling so you will still be routing to the Internet from your local public IP address and not via Azure.
For testing, if you deploy a private resource in Azure such as a virtual machine then you should be able to access it via it's private IP address to confirm your VPN is working correctly.

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 :)

Azure Permanently whitelisting IP

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/

Is it possible make requests to the server from another network

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

Not be able to connect to Azure SQL after connect through VPN

I am having a really wired problem with my home laptop.
Below is what I have done:
I have set up my own VPN via AWS.
I added VPN ip address to Azure SQL firewall ip table
By not having VPN, I can connect to Azure easily.
However, once I connect to the VPN, I got error when I try to connect to Azure.
Error message:
A connection was successfully established with the server, but then an
error occurred during the pre-login handshake. (provider: TCP
Provider, error: 0 - The specified network name is no longer
available.)
On the other hand, I can use VPN and connect to Azure SUCCESSFULLY from my office desktop.
I believe this is something to do with my Home laptop settings.
but even I disabled firewall on windows 7,
and after disable firewall on azure SQL as well.
I still having same connection problem
any ideas?
Try opening up the SQL Azure firewall to all addresses to do a test. Maybe when you VPN in, you are leaving through a proxy and so your actualy IP address to Azure is different. You can set up something like:
IP range start: 0.0.0.0
IP range end: 255.255.255.255
If that works, then maybe you can do something with masking your VPN address like:
10.10.0.0 - 10.10.255.255
By not having VPN, I can connect to Azure easily. However, once I connect to the VPN, I got error when I try to connect to Azure.
Some VPNs support co-existence with normal internet connections while others don’t. I am not sure if AWS VPN supports that or not. If not, when you connect to the VPN, you lose your internet connection and thus cannot connect to SQL Azure.
On the other hand, I can use VPN and connect to Azure SUCCESSFULLY from my office desktop.
If the issue is related to firewall setting, you can try to change the setting programmatically, please refer to http://blogs.msdn.com/b/sqlazure/archive/2010/07/29/10043869.aspx for a sample.
Best Regards,
Ming Xu.

Resources