Skip to main content

Using Azure private endpoints with self-managed services

Note

This topic applies only to Striim Cloud on Azure (Enterprise and Mission Critical).

Use cases supported

The following are the supported use cases for integrating Azure Private Link with self-managed services:

  1. Connecting to on-premise sources and targets.

    networking-azure-on-prem_001.png
  2. Connecting to sources and targets hosted on Amazon EC2 and Google Cloud VM.

  3. Connecting to sources and targets hosted on an-Azure VM.

    networking-azure-azure-vm_001.png
  4. Connecting to sources and targets that are AWS and GCP managed services.

    networking-azure-cross-cloud_001.png

Required Azure services

The following Azure services are required to configure your Azure Private Link connection:

  1. Azure Virtual Network (VNet): a foundational component of Azure networking, providing private, isolated network space for resources in Azure. It provides secure, flexible communication between Azure resources, on-premises environments, and the internet. See Create a virtual network.

  2. A subnet with a CIDR (Classless Inter-Domain Routing) block with a prefix of /24 is recommended for Azure Virtual Networks (VNets) because it provides a good balance between scalability, resource allocation, and simplicity in subnetting. For more information on creating subnets with CIDR, see Understanding CIDR Notation when designing Azure Virtual Networks and Subnets.

  3. Site-to-Site VPN: ensures that data transmitted between Azure and other networks is encrypted, private and secure, protecting sensitive information from unauthorized access and potential cyber threats that are prevalent over the public internet. See Create a Site-to-Site VPN.

  4. An Azure Virtual Machine: handles inbound port forwarding and network address translation rules. You can configure the VM with forwarding rules to allow it to accept and process traffic destined for addresses other than its own, such as those assigned by the Private Link configuration. See Create a virtual machine and Configure IP forwarding rules in the VM.

  5. Internal Load Balancer: to set up a Private Link Service, an Internal Load Balancer is essential. The load balancer distributes traffic to the downstream virtual machines (VMs). Additionally, Inbound NAT rules are used to forward specific traffic directly to the appropriate downstream VM. See Create a load balancer.

  6. Private Link Service: this service enables secure access to your downstream databases by exposing them to the Striim service, ensuring seamless connectivity. See Create an Azure Private Link service.

  7. Private Endpoint. See Create a Private Endpoint in Striim.

Create a virtual network

In this procedure you create an Azure Virtual Network (VNet) with two default subnets that do not overlap with your external network.

  1. Log in to the Azure portal.

  2. Navigate to the Virtual Networks page.

  3. Choose Create to create a new virtual network.

    azure-private-link-vnet-1.png
  4. In the IP Addresses page, create two subnets (subnet1 and subnet2) by choosing Add subnet and providing the subnet name and address range. Click Next.

    azure-private-link-vnet-2.png
  5. No other modifications are required in any other tabs. Choose Create. The virtual network will be created.

Create a Site-to-Site VPN

A Site-to-Site VPN ensures that data transmitted between Azure and other networks is encrypted, private and secure, protecting sensitive information from unauthorized access. To create this VPN with your Azure Virtual Network (vNet) follow one of the following:

Create a virtual machine

A VM will manage all incoming traffic and route it to specific databases using predefined port forwarding rules.

This procedure describes how to create an Azure Virtual Machine with an Ubuntu Server image.

  1. Search for Azure Virtual Machine and then choose Create.

  2. You are redirected to the Virtual Machines page. Fill the details as follows and choose Next.

    azure-private-link-vmachine1.png
    azure-private-link-vmachine1b.png
  3. Under Networking, provide the following details and choose Next.

    azure-private-link-vmachine2.png
  4. Keep all the other options unedited and then choose Create.

Configure IP forwarding rules in the VM

Once you have configured the virtual network and virtual machine, and set up the VPN, you should verify that you are able to access your database from the proxy VM over the VPN. See this Azure Private Link topic for information on testing connectivity.

You can then configure IP forwarding rules in the Virtual Machine (VM) in Azure to enable the VM to act as a network intermediary, allowing it to forward traffic that it receives from one network interface (NIC) to another.

  1. Log in to the VM using the Secure Shell (SSH) network protocol.

  2. Execute the following commands to create IP forwarding rules as the root user:

    # local port where Load Balancer sends traffic to:
    SOURCE_PORT=<portT1>
    # destination server inside the internal network:
    DESTINATION_IP=<databaseT1_IP>
    DESTINATION_PORT=<portT1>
    
    # enable IP forwarding on the host:
    echo 1 > /proc/sys/net/ipv4/ip_forward
    
    # clear the existing iptables rules and chains:
    iptables -F
    iptables -t nat -F
    iptables -X
    
    # change the packet recipient from local to destination socket (host & port):
    iptables -t nat -A PREROUTING -p tcp --dport ${SOURCE_PORT} -j DNAT --to-destination ${DESTINATION_IP}:${DESTINATION_PORT}
    
    # change the source IP address from the LB NAT IP address to the IP of this LB-backend host:
    iptables -t nat -A POSTROUTING -p tcp -d ${DESTINATION_IP} --dport ${DESTINATION_PORT} -j SNAT --to-source $(hostname -i)
    
    # to save the iptables rules:
    iptables-save
    
    # to make this rule persistent during reboot, download the iptables-persistent package (press yes in the popup window to acknowledge):
    apt install iptables-persistent
    
    # to review iptables rules:
    iptables -t nat -nvL
  3. To create additional rules, use the following commands:

    # local port where Load Balancer sends traffic to:
    SOURCE_PORT2=<portT2>
    # destination server inside internal network:
    DESTINATION_IP2=<databaseT2_IP>
    DESTINATION_PORT2=<portT2>
    
    # do not clear the existing iptables rules and chains
    
    # change the packet recipient from the local to destination socket (host and port):
    iptables -t nat -A PREROUTING -p tcp --dport ${SOURCE_PORT2} -j DNAT --to-destination ${DESTINATION_IP2}:${DESTINATION_PORT2}
    
    # change the source IP address from the LB NAT IP address to the IP of this LB-backend host:
    iptables -t nat -A POSTROUTING -p tcp -d ${DESTINATION_IP2} --dport ${DESTINATION_PORT2} -j SNAT --to-source $(hostname -i)
    
    # to save the iptables rules:
    iptables-save
    
    # to review the iptables rules:
    iptables -t nat -nvL

Create a load balancer

Create an internal load balancer with inbound NAT rules to forward traffic from the load balancer to the VM.

  1. Navigate to the Azure load balancer page and choose Create.

  2. In the Basics page, configure the following settings for the load balancer, then choose Next:

    • The subscription.

    • The Resource group that you used for the previous resource creation.

    • The name

    • The region

    • SKU: Standard

    • Type: Internal

    • Tier: Regional.

    azure-private-link-load-bal1.png
  3. In the Frontend IP configuration page, choose Add a Frontend IP Configuration, provide the details and choose Add.

    • Name

    • Virtual network

    • Subnet

    • Assignment: Dynamic

    • Availability zone

    azure-private-link-ld-bal-frontend.png
  4. In the Backend pool page, choose Add a Frontend IP Configuration, provide the details and choose Next.

    • Name

    • Virtual network

    • Backend Pool Configuration: NIC

    azure-private-link-ld-bal-backend.png

    Leave the other options unedited and then choose Create. The load balancer will be deployed and then available.

  5. Open the Load Balancer created and then choose Health Probes from the left menu.

  6. Choose Add and then provide the following health probe properties.

    • Name

    • Protocol: HTTP

    • Port: for example, 80

    • Path: /

    • Interval: for example, 5

    azure-private-link-ld-bal-health2.png
  7. Choose Load Balancing Rule from the left menu and then add the following details.

    • Name

    • IP Version: IPv4

    • Frontend IP address: <select the frontend load balancer you created>

    • Backend pool

    • Protocol: TCP

    • Port: for example, 80

    • Backend port: for example, 80

    • Health probe: <select the health probe you created>

    • Session persistence: None

    • Idle timeout: specify a timeout in minutes such as 15 minutes

    • TCP reset: Enabled

    • Floating IP: Disabled

    azure-private-link-ld-bal-health3.png
  8. Choose Inbound NAT Rules from the left menu and fill the below details and choose Create.

    • Name

    • Type: Azure virtual machine

    • Target virtual machine: <select the virtual machine you created>

    • Network IP configuration

    • Frontend IP address: <select the frontend load balance you created>

    • Frontend port

    • Service Tag

    • Backend port

    • Protocol: TCP

    • Enable TCP Reset: selected

    • Idle timeout: specify a timeout in minutes such as 15 minutes

    • Enable Floating IP: unchecked

    azure-private-link-ld-bal-inbnat.png
  9. Create additional rules if you have more than one database source/target using the same load balancer. Note that each database should have a unique port and you need to create rules for each port.

  10. Review the load balancer configuration.

Create a Private Endpoint in Striim

This sections describes how to create a private endpoint for your Striim Cloud application using the Private Link Service alias. Once you have created the endpoint, you need to approve the private endpoint connection in Azure, which establishes a connection to your databases located in your external network.

You will also receive an email from Striim with your private endpoint IP and/or DNS information. You can also find this information in the Striim console under the Secure connection tab. You can next use the IP address or DNS name to configure your source or target endpoint within the Striim application connection URL.

  1. Log in to your Striim Cloud account.

  2. Select the service you want to create a private endpoint with.

  3. Under the Secure connection tab, choose Create Private Endpoint.

    azure-private-link-endpoint1.png
  4. Enter a descriptive name for your endpoint, and paste the Private Link Service Alias you copied in step 6(e). Then choose Create.

  5. In Azure, go to your Private link service portal and select the Private link service that you created earlier. Under Private endpoint connection, you can see a connection in the pending state.

    azure-private-link-endpoint-approval.png
  6. Select the connection name and choose Approve. After some time you can see the connection status changes to Approved.

  7. You receive an email with your private endpoint IP and/or DNS information. You can also find the DNS information in the Striim Cloud portal under the Secure connection tab.

  8. Use that IP address or DNS name to configure your Striim Cloud endpoints using the application connection URL.