4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

App ServiceをApplication Gatewayのバックエンドとして実装してWAFを試す

Posted at

App ServiceにWAFを実装したかったので試した手順を残します。
App Serviceは既にあるものとします。

Azure WAF

AzureのWAFはApplication GatewayというL7ロードバランサーサービスに付帯して使うことができます。
ルールセットはOWASPモジュールに基づいています。

Application Gateway構築

以下公式手順でサクッと作ります。レベルは[WAF]もしくは[WAF V2]を選択します。
アプリケーション ゲートウェイの作成

バックエンドにApp Serviceを指定する

  • バックエンドプールを開きます
    image.png

  • デフォルトは以下の状態です。
    image.png

  • [App Service]を選択し、プルダウンから該当のApp Service名を選びます。
    image.png

  • HTTP設定を選択します。
    image.png

  • デフォルトは以下の状態です。
    image.png

  • [App Service用に使用します]にチェックを入れて保存します。
    image.png

WAF機能を有効にする

  • ファイアウォールの状態を[有効]にします。機能検証のためモードは[防止]にしておきます。
    image.png

機能テスト

  • 以下URLをブラウザから実行します。
http://[Application Gateway パブリックIP]/?<script>test</script>
  • 403エラーが出ればOKです。
    image.png
4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?