Skip to content

Bug: ALZ Landing Zone Accelerator Hub/Spoke with VPN Gateway P2S & DNS Issues #449

@capitanou

Description

@capitanou

Is there an existing issue for this?

  • I have searched the existing issues

Infrastructure as Code Type? (Required)

Terraform

PowerShell Module Version (Optional)

No response

Bootstrap Module Version (Optional)

No response

Starter Module? (Required)

terraform - platform_landing_zone

Starter Module Version (Optional)

singe region hub-spoke

Input arguments of the ALZ-PowerShell-Module (Optional)

No response

Debug Output/Panic Output (Optional)

Expected Behaviour (Required)

When configuring VPN P2S connectivity the VPN client profile generated from the vpn gateway does not include dns_server settings. The result is the macOS & Windows client is not able to resolve host names to azure resources such as storage using nslookup .blob.core.windows.net. to the private ip.

The Client profile can be manually edited to overcome the issue as a temporary workaround by specifying pointing to the Private DNS Resolver on the hub as documented here: https://learn.microsoft.com/en-us/azure/vpn-gateway/azure-vpn-client-optional-configurations

Attempting to push these settings by specifying in the Terraform deployment does not update the VPN Profile. Expected behavior would be for the VPN profile downloaded from the VPN Gateway P2S configuration to include the dns_servers suggested and applied during the terraform apply.

Here's the configuration used below.

platform-landing-zone.tfvars  VPN configuration
vpn = {
    name = "$${primary_virtual_network_gateway_vpn_name}"
    sku  = "VpnGw1AZ"
    #removing this option because it requires Express Route Gateway.
    #vpn_dns_forwarding_enabled = true
    ip_configurations = {
      active_active_1 = {
        # name = "vnetGatewayConfigactive_active_1"  # For backwards compatibility with previous naming, uncomment this line
        public_ip = {
          name = "$${primary_virtual_network_gateway_vpn_public_ip_name_1}"
        }
      }
      active_active_2 = {
        # name = "vnetGatewayConfigactive_active_2"  # For backwards compatibility with previous naming, uncomment this line
        public_ip = {
          name = "$${primary_virtual_network_gateway_vpn_public_ip_name_2}"
        }
      }
      p2s_ip_config = {
        public_ip = {
          name = "$${primary_virtual_network_gateway_vpn_public_ip_name_p2s}"
        }
      }
    }
    vpn_point_to_site = {
      address_space        = ["172.16.0.0/24"]
      vpn_auth_types       = ["AAD"]
      aad_audience         = "41b23e61-6c1e-4545-b367-cd054e0ed4b4"
      aad_issuer           = "https://sts.windows.net/<tenantid>/"
      aad_tenant           = "https://login.microsoftonline.com/<tenantid>/"
      vpn_client_protocols = ["OpenVPN"]
      dns_servers          = ["10.0.0.X"] 
    }
  }
}

Actual Behaviour (Required)

VPN Profile does not contain the dns_server settings provided in the Terraform configuration.

Steps to Reproduce (Optional)

No response

Important Factoids (Optional)

No response

References (Optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Long Term ⌛We will do it, but will take a longer amount of time due to complexity/prioritiesType: Bug 🪲Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions