Not able to ping onpremise ovpn client from azure opvn server but working the other way around - azure-vpn

I have an azure virtual network. That has a OpenVPN Access Server Azure Appliance, with a ip x.x.x.4 and vpn ip a.b.c.1 . Onpremise there is a OVPN client with ip x.y.z.7 and vpn ip a.b.c.4. I am able to ping x.x.x.4 from the onprem client, but from the openvpn appliance am not able to ping the onprem client. I am new to networking, so any help would be greatly appreciated.

In the ovpn server webui page changed VPN settings->Routing->yes, using NAT to Yes,use Routing
https://openvpn.net/vpn-server-resources/reach-openvpn-clients-directly-from-a-private-network/

Related

Connect from Azure Windows VM (Windows Server 2012) to VPN using built-in VPN client

I am trying to connect to a VPN from a Windows VM on Azure and cannot do so. I am using the built-in Windows VPN Client.
I am connecting to this VPN in order to be able to access a server within that VPN and send and receive HTTP Requests.
I have been able to connect to this VPN normally on other devices using the built-in Windows VPN Client. I followed the exact same steps for the VM but receive the following error when trying to connect:
Error 800:The remote connection was not made because the attempted VPN tunnels failed. The VPN server might be unreachable. If this connection is attempting to use an L2TP/IPsec tunnel, the security parameters required for IPsec negotiation might not be configured properly
Error
I have also opened ports 1723,1701,500,47,4500 in Azure portal for both inbound and outbound on the Azure Portal (screenshot
here)
I have also tried the steps described in this post:
Make a VPN Connection from Azure VM
But does not do what I want. I have the VPN's public IP and username/password, and nowhere does the above mention how to set this up.
Do I need any additional settings or open any other ports in order for this to work?
From your comment, it seems that you want to connect Azure VM to a server on your on-premise network with your local VPN device.
In this case, you could set up a site-to-site VPN connection to connect the Azure VNet and on-premise network following this tutorial: https://learn.microsoft.com/en-us/azure/vpn-gateway/tutorial-site-to-site-portal
After that, you can directly connect to your Azure VM with its private IP address from your on-premise server. In fact, you don't need to connect from Azure Windows VM (Windows Server 2012) to VPN using a built-in VPN client because once the VPN is connected, the traffic from the on-premise network to the Azure network goes through the VPN tunnel and vice versa. We don't need to connect from Azure VM just from on-premise resources.

How to access internet from azure point to site vpn (Not working)?

I set up the Point to site vpn in azure vnet with virtual network gateway which is working fine using openvpn . Now i can able to connect to azure vm via private ip but i could not able to access internet from my Host Machine (Local machine where i connected my vpn ).
**Before VPN Set up i can able to connect to Internet Please click below for ping results **
Before VPN connected ping results
**After VPN Set up i cannot able to connect to Internet Please click below for ping results **
After VPN connected ping results
For the Host Machine to be blocked something must have changed on the Host machine or on the subnet on which it is located.
When setting up a VPN, you should set up a gateway subnet that is used only for that.
Have you used the subnet on which the VM is located as the gateway subnet?

Cisco Anyconnect VPN IP Address not being used to connect to Azure SQL Server

I am able to connect to Azure SQL Servers by defining my IP address in the firewall rules for a server. Although due to working from home and having a dynamic IP address, this can become tedious and annoying for other databases that I have to request to get my new IP address added to to gain access.
I have connected to my company's VPN through Cisco Anyconnect VPN. Is it possible for SQL Server Management Studio to use the VPN's IP address to connect to Azure SQL Servers so I can access the server using the VPN? Currently when I'm connected to the VPN and try to connect through SSMS, my public IP address is still being used and says that my address does not have access to the server. How would I be able to configure this to use Cisco Anyconnect VPN's IP address instead?
When you connect to your company's VPN through Cisco Anyconnect VPN. You should add the outbound public IP address list from your company to the firewall rules for a Azure SQL Server.
You may ask your security admin for the IP lists or check your current Public IP here with connecting VPN connection.

Connect to Azure SQL Server from computer with dynamic external IP

I am trying to connect an on-premises laptop with dynamic external IP to our Azure SQL Server. To do this, I created a virtual network gateway and connected the laptop to the gateway. Also, I added a private endpoint to the SQL server. After this, I can successfully connect to the SQL server IP using telnet, and if I resolve the SQL server FQDS in hosts file, I can connect to the server via SSMS. But without hosts file, the laptop always tries to connect to the SQL server via its public endpoint/address.
I found the following article: https://techcommunity.microsoft.com/t5/azure-database-support-blog/azure-sql-db-private-link-private-endpoint-connectivity/ba-p/1235573 The article is great. It recommends using your own DNS server to resolve the SQL server FQDN to the local IP. Unfortunately, the laptop does not have access to any custom DNS, so this solution does not suit.
There are two questions:
Is there any possibility to establish connection between an on-premises computer with dynamic IP and an Azure SQL server using a private endpoint but without own DNS server?
If the answer to the first question is "No", is there another way to connect an on-premises computer with dynamic IP to an Azure SQL server using any other Azure application(s)?
First of all, you can not use FQDN without DNS service. So you indeed need a custom DNS server in using FQDN of the server in connection strings for your clients to connect from on-premise VM to the Azure SQL server.
Since you are using a laptop, the DNS servers used by your computer are most likely specified by your ISP. You have no more control over it or ask your ISP to configure the DNS forwarder. Otherwise, you need to deploy a DNS server in your internal network. Currently, in this scenario, the best method is to use the HOSTS file on the local machine to override the Public DNS.
However, if you don't like using the HOSTS file, you can provision an Azure VM as the DNS server in the same Azure virtual network as the virtual network gateway.
Main steps:
Deploy an Azure VM, and RDP to that VM and run the PowerShell commands to install the DNS server role.
Install-WindowsFeature -Name DNS -IncludeManagementTools
Get-WindowsFeature *DNS*
Add Azure DNS (168.63.129.16) as a forwarder on your custom DNS server according to the step 5 in this blog. If you do not want to use forwarder you can also create a forward lookup zone and added manually the host to match the FQDN. You could read On-premises workloads using a DNS forwarder for more details.
After you have configured the DNS server and set the DNS forwarder. You could change the DNS server of Azure VNet to your Azure VM's private IP address.
Restart your Azure VM and re-download the VPN client package and re-connect the VPN connection to make the networking update. Check the DNS server on the local VPN client machine and set the DNS server to the custom DNS server in the TCP/IP settings. Then you will look up your private IP address via the default FQDN of Azure service.
In my example, I am using Azure storage account but it works the same with Azure
SQL database when using a private endpoint on the Azure and P2S VPN connection.
In this way, it requires that there are not any other VPN connections except the
P2S VPN connection on the local machine.
Then you could resolve the Azure SQL server FQDN to the private IP address of the private endpoint. However, it perhaps does not have a better performance to connect to Azure SQL Server with a VPN connection than directly connect to it through the public Internet and public DNS sevice.

Unable to join to domain hosted on Azure VM

So I've created a VM Win Server 2016 on Azure. I've created a VPN connection between Azure VM (Which is AD DC) and a test windows machine. I can ping AD IP (but not domain, only IP), RDP into machine etc.. however when I try to join domain it's not recognized. So it's probably DNS issue on Azure but I've been unable to resolve it? What to do? How to proceed? The idea is to be able to connect remote machines via Point to Site VPN to AD DC on Azure.
Thanks
You need to have your DC listed as a DNS server if you are doing AD integrated DNS Or have a public record so that the Azure DNS servers can advertise it. Make sure you have done the step - Reset the DNS server for the Azure virtual network. You can also refer to http://msdn.microsoft.com/en-us/library/azure/jj156090.aspx for guidance and http://azure.microsoft.com/en-us/documentation/articles/virtual-networks-install-replica-active-directory-domain-controller/ for steps.
I've created a VPN connection between Azure VM (Which is AD DC) and a
test windows machine.
Could you please tell me which kind VPN do you deployed?
If you select S2S VPN, we can change the test windows machine's DNS to Azure VM's private IP address, then try to ping the domain name, if we can ping it, we can join this test vm to the AD DC.
If your VPN is P2S, we should change the test windows machine's DNS to the Azure VM P2S virtual IP address(get from p2s), then try to ping the domain name, and join to it.

Resources