Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosBuilding AMD Helios: Testing and Validating Rackscale AI Solutions(24.09.2026 um 17:30 Uhr)
Podcasts & Audio Briefings9to5Google: The Googlebook could do something insane.(24.09.2026 um 17:30 Uhr)
YouTube Security VideosBack to School Raspberry Pi Quiz! #bermonths #quiz #raspberrypi(24.09.2026 um 17:24 Uhr)
YouTube Security VideosPC-WELT: Endlich hat die 2. RTX 5090 Sinn - lokale KI auf HMX 6!(24.09.2026 um 17:30 Uhr)
Windows Tipps & SecurityuBlock Origin broke on Edge, so I finally quit the browser(24.09.2026 um 17:24 Uhr)
Windows Tipps & SecurityHMX 6: Wir müssen reden(24.09.2026 um 17:30 Uhr)
Windows Tipps & SecurityWinamp Community Update Project(24.09.2026 um 16:40 Uhr)
YouTube Security VideosBuilding AMD Helios: Testing and Validating Rackscale AI Solutions(24.09.2026 um 17:30 Uhr)
Podcasts & Audio Briefings9to5Google: The Googlebook could do something insane.(24.09.2026 um 17:30 Uhr)
YouTube Security VideosBack to School Raspberry Pi Quiz! #bermonths #quiz #raspberrypi(24.09.2026 um 17:24 Uhr)
YouTube Security VideosPC-WELT: Endlich hat die 2. RTX 5090 Sinn - lokale KI auf HMX 6!(24.09.2026 um 17:30 Uhr)
Windows Tipps & SecurityuBlock Origin broke on Edge, so I finally quit the browser(24.09.2026 um 17:24 Uhr)
Windows Tipps & SecurityHMX 6: Wir müssen reden(24.09.2026 um 17:30 Uhr)
Windows Tipps & SecurityWinamp Community Update Project(24.09.2026 um 16:40 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How to Automate Azure App Service IP Whitelisting with Azure DevOps Pipeline

If you’re managing IP restrictions for an Azure App Service, you’ve likely encountered the need to add, update, or remove IP addresses for access control. Doing this manually can be cumbersome and prone to errors, especially when dealing wi…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Image description



If you’re managing IP restrictions for an Azure App Service, you’ve likely encountered the need to add, update, or remove IP addresses for access control. Doing this manually can be cumbersome and prone to errors, especially when dealing with multiple environments or services. By using an Azure DevOps (ADO) pipeline, you can automate IP whitelisting, ensuring that changes are applied consistently.



In this guide, I’ll walk you through using the Azure CLI in an Azure DevOps pipeline to manage IP restrictions dynamically. We’ll set up a pipeline that:



Accepts an IP address and rule name as parameters.

Checks if an existing IP restriction with the specified name already exists. Deletes the existing rule if found and adds the new IP restriction with a specified priority. let's dive in!



Prerequisites

Before we get started, make sure you have:




  1. Azure CLI installed on your DevOps agent.

  2. Azure Service Connection in ADO, allowing access to your Azure subscription.

  3. Resource Group and App Service name where you plan to implement IP restrictions.



Step 1: Understanding the Azure CLI Commands

The Azure CLI provides straightforward commands for managing access restrictions. Here’s a quick breakdown:



Add an IP Restriction

This command adds an IP address to the list of allowed addresses for your app service, specifying a priority to manage the order of rules.




az webapp config access-restriction add \
--resource-group <RESOURCE_GROUP> \
--name <APP_SERVICE_NAME> \
--rule-name <RULE_NAME> \
--ip-address <IP_ADDRESS> \
--priority <PRIORITY> \
--action Allow







Remove an IP Restriction by Name

This command deletes an IP restriction by referencing the rule name.




az webapp config access-restriction remove \
--resource-group <RESOURCE_GROUP> \
--name <APP_SERVICE_NAME> \
--rule-name <RULE_NAME>






Step 2: Setting Up the Azure DevOps Pipeline

Now, we’ll create an ADO pipeline that uses these CLI commands. This pipeline will take three parameters: ruleName, ipAddress, and priority. If a rule with the specified name already exists, it will be deleted before adding the new IP restriction.



Here’s the complete YAML file for the pipeline:




trigger: none

parameters:
- name: ruleName
displayName: 'Name of the IP Rule'
type: string
default: ''
- name: ipAddress
displayName: 'IP Address to Allow'
type: string
default: ''
- name: priority
displayName: 'Priority of the Rule'
type: number # Corrected type from 'int' to 'number'
default: 100

jobs:
- job: ManageAppServiceIP
displayName: 'Manage App Service IP Whitelisting'
pool:
vmImage: 'ubuntu-latest'

steps:
- task: AzureCLI@2
displayName: 'Check and Update IP Restriction on App Service'
inputs:
azureSubscription: '<YOUR_AZURE_SERVICE_CONNECTION>'
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
# Define variables
RESOURCE_GROUP="<RESOURCE_GROUP>"
APP_SERVICE_NAME="<APP_SERVICE_NAME>"
RULE_NAME="${{ parameters.ruleName }}"
IP_ADDRESS="${{ parameters.ipAddress }}"
PRIORITY="${{ parameters.priority }}"

echo "Checking if IP restriction rule exists for ${RULE_NAME}..."

# Check if the IP rule with the specified name already exists
EXISTING_RULE=$(az webapp config access-restriction show \
--resource-group $RESOURCE_GROUP \
--name $APP_SERVICE_NAME \
--query "ipSecurityRestrictions[?name=='$RULE_NAME']" \
-o tsv)

# If rule exists, delete it
if [[ -n "$EXISTING_RULE" ]]; then
echo "Rule ${RULE_NAME} exists. Deleting existing rule..."
az webapp config access-restriction remove \
--resource-group $RESOURCE_GROUP \
--name $APP_SERVICE_NAME \
--rule-name $RULE_NAME
echo "Existing rule ${RULE_NAME} deleted."
else
echo "No existing rule found for ${RULE_NAME}. Adding new rule."
fi

# Add the new IP restriction with priority
echo "Adding IP restriction for ${IP_ADDRESS} with name ${RULE_NAME} and priority ${PRIORITY}..."
az webapp config access-restriction add \
--resource-group $RESOURCE_GROUP \
--name $APP_SERVICE_NAME \
--rule-name $RULE_NAME \
--ip-address $IP_ADDRESS \
--priority $PRIORITY \
--action Allow
echo "IP restriction rule ${RULE_NAME} added successfully with priority ${PRIORITY}."






Step 3: Fixing YAML Errors in ADO

When working with YAML files in ADO, you may encounter validation errors. For example, if you receive an error like String does not match the pattern of “^boolean$”, it could indicate a type mismatch.



In our case, the type of priority was initially set to int, which Azure DevOps expects as number. Changing it from int to number resolved the error:




- name: priority
displayName: 'Priority of the Rule'
type: number # Set type to 'number' instead of 'int'
default: 100






Conclusion

Automating IP whitelisting for an Azure App Service saves time and reduces human error. By using an ADO pipeline, you ensure that IP restriction rules are managed consistently across environments. This setup is flexible, allowing you to update IP restrictions simply by providing new inputs when running the pipeline.



Tip: Consider adding notifications or approval steps in ADO if you’re managing critical IP whitelisting to prevent accidental overrides.

Happy automating!

SOC Incident Playbook: Remote Code Execution (RCE) Defense
title: Detect Exploitation - How to Automate Azure App Service IP Whitelisting with Azure DevOps Pipeline
id: c308e46b-935a-4627-b0a3-26a9963b8758
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "How to Automate Azure App Serv" ascii wide
    condition:
        any of them
}
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich How to Automate Azure App Service IP Whi.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to Automate Azure App Service IP Whitelisting with Azure DevOps Pipeline

Thematisch verwandte Begriffe: Automate, Azure, Service, Whitelisting · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-79764 | Termix is a web-based server management platform with SSH terminal, tunn…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...
↗ Original-Quelle