GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Lab/PLS-for-onprem-workloads-firewall at master · dmauser/Lab

Expand file tree

/

PLS-for-onprem-workloads-firewall

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

PLS-for-onprem-workloads-firewall

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
linked
linked
 
 
media
media
 
 
README.md
README.md
 
 
azuredeploy.json
azuredeploy.json
 
 
opndeploy.azcli
opndeploy.azcli
 
 

README.md

Outline

Using Private Link Service to publish On-premises workloads by using NVA Firewall (TBD)

Contents

Concepts

Deploy this solution

LAB Steps

Clean up

Concepts

This lab is based on the reference architecture: Using Private Link Service for On-premises workloads and it leverages HA-Proxy behind an Azure Load Balancer and Private Link Service. This solution will fully build the solution on the Provider side as shown in the diagram below. Therefore, you don't need to configure any component like HAProxy, Load Balance, and Private Link Service. Most of the actions are going to be to expose On-premises web workload (On-prem VM name provider-onprem-vmlx exposed using local's VM Nginx) by creating Private Endpoints on customer A and B and validating access via Private Link to reach the Provider's On-premises VM.

Architecture diagram

Private Link for On-premises workloads using HA Proxy

Below some important details of each environment deployed:

Provider

  1. Virtual networks: provider-az-vnet (Azure - 192.168.0.0/24) and provider-onprem (emulated On-premises 192.168.0.0/24)
  2. Virtual Machines: Provider-onprem-lxvm (with IP 192.168.1.4 and running Nginx) and Provider-az-lxvm (10.0.0.4).
  3. VM Scale Set: pls-ha-proxy using two instances inside haproxy subnet.
  4. Internal load standard balancer pls-std-ilb (10.0.0.132).
  5. Private Link Service: pls-haproxy using 10.0.0.164 that is from subnet pls-nat-subnet.
  6. VPN Gateways and connection between Azure and On-premises environment.

Customer A and B

  1. Virtual networks: Cx(A/B)-az-vnet (Azure - 192.168.0.0/24) and zcx(a/b)-onprem (emulated On-premises 192.168.0.0/24)
  2. Virtual Machines: Cx(A/B)-onprem-lxvm (with IP 192.168.1.4 and running Nginx) and Cx(A/B)-az-lxvm (10.0.0.4).
  3. VPN Gateways and connection between Azure and On-premises environment.

Note: All three environments use the same address space which is another benefit of Private Link Service that has built-in SNAT. Also, you can deploy each environment in different regions. As shown in the diagram above where you Provider on US Central, Customer A on East US, and Customer B on West US.

Deploy this solution

Deploy To Azure Visualize

Note: The template provisioning takes approximately 25-30 minutes to complete the Provider environment and 20 minutes for each Customer environment.

Deploy three separated environments for Provider, Customer A and Customer B using the same link by:

  1. Selecting each one of the respective environments:

    Environment

  2. Set your username and password (SSH public key option coming soon).

  3. (Optional) set Public IP to restrict SSH access only using your public IP (obtain your public IP by using command curl ifconfig.io). You have to specify public IP plus CIDR, example 1.1.1.1/32.

    Environment

Configure Firewall (Provider side only)

OPNsense configuration

Obtain Pulic IPs

echo opn-nva1 - $(az network public-ip show --name OPN-NVA1-PublicIP --resource-group $rg -o tsv --query "ipAddress" -o tsv) \
opn-nva2 - $(az network public-ip show --name OPN-NVA2-PublicIP --resource-group $rg -o tsv --query "ipAddress" -o tsv) 

1) Lobby\Password

Please, change the default password. It is recommended set the same password for both NVAs to facilitate configuration replication used later in the guide.

Steps below on opn-nva1 only

On opn-nva1 only make the following changes. Later those changes will replicated automatically to opn-nva2.

Here is a table with all settings to be configured:

1) Firewall: Rules: LAN

Modify existing rule to allow any traffic. Edit and change Source from LAN net to Any and save.

Firewall: Rules: LAN*

2) Firewall: NAT: Port Forward

Section Setting Value
Firewall: NAT: Port Forward And new Rule
Name LANGW
Interface WAN
Source Advanced
Source Single host or Network - 10.0.0.160/28
Destination Single host or Network - 192.168.1.4
Destination port range from: HTTP to: HTTP

NAT Port Forward rule should look like:

System: Routes: Configuration

3) System: High Availability: Settings

Setting Value
Synchronize Config to IP 10.0.0.37 (*)
Remote System Username root
Remote System Password opnsense (or newer OPNsense password)
Dashboard Checked
Firewall Rules Checked
NAT Checked
Static Routes Checked
FRR Checked

(Note): Get LAN IP for opn-nva2 by running the following CLI commands:

#opn-nva2
az network nic show -g $rg --name $nva2-Trusted-nic --query "ipConfigurations[].privateIpAddress" -o tsv

On the same screen click Perform synchronization that you can find besides: Configuration Synchronization Settings (XMLRPC Sync). That should bring you to: System: High Availability: Status screen. Click in Synchronize to push configuration from opn-nva1 to opn-nva2 as shown:

System: High Availability: Settings

LAB Steps

Goal: Allow customers A and B access Provider's On-premises web workload.

Use the steps below using Azure Portal. You need to go back and forth between Provider and Customers A and B.

  1. On the Provider side obtain the Private Link Service (PLS) alias.

    Environment

  2. On Customer (A and B) side deploy Private Endpoints using Private Link Center, selecting Private endpoints (1) and adding a new one (2).

    Environment

  3. Follow the wizard and make sure to paste the PLS alias from step 1.

    Environment

  4. Place the private endpoint on Cx(A/B)-az-vnet on Subnet1 as shown:

    Environment

  5. Review the Private endpoint on the Customer side and note that it is waiting for approval and has IP 10.0.0.5 allocated by clicking on the NIC.

    Environment

    Environment

  6. At this point, if you try to connect over that Private endpoint connection should fail. You can try a curl 10.0.0.5 on either Cx(A/B)-onprem-lxvm (192.168.1.4 and running Nginx) and Cx(A/B)-az-lxvm (10.0.0.4).

  7. Approve Private Link connection on Provider side over pls-proxy (private link service) as shown:

    Environment

  8. Try again Curl 10.0.0.5 and you should have the right output. Below curl output before approval (fail to connect) and after with provider-onprem-vmlx output:

    CxB-az-lxvm

    Environment

    CxB-onprem-lxvm

    Environment

  9. Review Nginx access logs on Provider-onprem-vmlx. You should see the source IP of one of the HAProxy VMSS instances 10.0.0.135 and Private Link Service (pls-haproxy) NAT IP after enabling X-FORWARDED-FOR on Nginx configuration by using option 1 of this reference guide.

    Environment

Clean up

Delete Resource Groups for each one of the deployed environments.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.