2015/01/22

Azure WebsitesでWAF(Web Application Firewall)

ModSecurityが使えます。

日本語
http://blogs.msdn.com/b/windowsazurej/archive/2014/10/10/blog-modsecurity-web-application-firewall-on-azure-websites.aspx

英語
http://azure.microsoft.com/blog/2014/09/29/modsecurity-for-azure-websites/

ActiveDirectoryの災害対策


http://azure.microsoft.com/blog/2015/01/21/setting-up-active-directory-for-a-disaster-recovery-environment-2/

内部負荷分散セット、Azure Internal Load Balancing (ILB)、DirectServerReturn 設定変更

既存のEndPointへの設定変更はできない模様。。
DirectServerReturnを行うためには、それ前提でEndPointを作る必要あり。
# PowerShell上の実行結果では、EnableDirectServerReturn


===例
PS C:\> get-azurevm -ServiceName cs-web -name web4 | Set-AzureEndpoint -name WebEP -DirectServerReturn $true | Update-AzureVM

Update-AzureVM : BadRequest: Windows Azure does not support modifying Direct Server Return settings on an existing endpoint. Please d
elete and recreate the endpoint with Direct Server Return set to True.
=



負荷分散、まとめ
http://taleofazure.blogspot.jp/2015/03/blog-post_4.html

内部負荷分散セット、Azure Internal Load Balancing (ILB)、パケットの流れ


■前提
client IP:172.18.2.4
server IP:172.19.1.4
ILB IP:172.19.1.251


■client から server に http Request
=client側でネットワークモニタで観察した結果
送信元:172.18.2.4
送信先:172.19.1.251
=server側でネットワークモニタで観察した結果
送信元:172.18.2.4
送信先:172.19.1.4

無論、serverのログにも、172.18.2.4からの着信記録。


■server から client に http Response
=server側でネットワークモニタで観察した結果
送信元:172.19.1.4
送信先:172.18.2.4
=client側でネットワークモニタで観察した結果
送信元:172.19.1.251
送信先:172.18.2.4




Azure IaaS、Windows Server の SNMPサービス


http://support.microsoft.com/kb/2721672/ja

に記載されているとおり、サポート対象ではありません。
これはAzureからの観点ではなく、あくまでもWindows Server OSから見たサポートの観点で「Windows Server OS標準実装のSNMPサービス」をAzure IaaS上で動かすことをサポートしない、ということです。

Azure上に限らず、そもそも「Windows Server OS標準実装のSNMPサービス」自体、使用が推奨されなくなっています。このあたりが、Azure IaaS上で動かすことをサポートしなくなった理由かな、と筆者は推測します。
https://technet.microsoft.com/ja-jp/library/hh831568.aspx



無論、
プロトコルとしてのSNMPはAzure上で利用できます。Linux上はもとより、たとえWindows Server上であっても「Windows Server OS標準実装のSNMPサービス」以外のSNMPサービスであれば、そして、そのプロバイダーがAzure上でそれをサポートするのであれば、問題なく使用できます。


サポートされなくてもいいから使えるか否か知りたい方々へ。
「Windows Server OS標準実装のSNMPサービス」がそもそもAzure上で使えるのか否か、を試してみました。
筆者環境下では、とりあえず使えました。

2015/01/21

Inside Azure Websites

ありがたい まとめ です。
http://sqlazure.jp/b/windows-azure/1343/

What is the Matrix?

Azure 内部のカラクリ調査、の記録

仮想マシンから、vNet規定のDHCPサーバ(vNet規定のDNSサーバも同じIP)のIPアドレスに対して、定期間隔で http request が出されていた。

調べてみたところ、

C:\WindowsAzure 下にある、
WindowsAzureGuestAgent.exe が、15秒間隔
WaAppAgent.exe が、60秒間隔

で、以下のやりとりを行っていた。

HTTP Request Get /machine?comp=goalstate
HTTP Response OK(200)

どちらの .exe も、Azure Windows Agent の一部なので、動いていることは必須ではないハズ。
# Azure Windows Agent自体、Azure IaaS上の仮想マシンが動作するにあたって必須のものではないので。
http://blogs.msdn.com/b/mast/archive/2014/02/17/bginfo-guest-agent-extension-for-azure-vms.aspx

実際、Azure Windows Agentが入っていない仮想マシンでは、上記事象は発生していない。



検索したところ、特許発見。

Goal state communication in computer clusters
http://www.google.com/patents/US8719402

2015/01/20

内部負荷分散セット、Azure Internal Load Balancing (ILB)

Azure IaaS 内の負荷分散。

英語
http://msdn.microsoft.com/en-us/library/azure/dn690125.aspx
日本語
http://msdn.microsoft.com/ja-jp/library/azure/dn690125.aspx



まず、既存のCloud ServiceでILBが機能するよう施す。
=Sample=
PS C:\> Add-AzureInternalLoadBalancer -InternalLoadBalancerName web-ilb -ServiceName cs-web -StaticVNetIPAddress 172.19.1.251 -SubnetName Subnet-172.19.1
=

次に、ILBに、既存の仮想マシンのエンドポイントを追加する。
Add-AzureEndpoint
=Sample = 2つの仮想マシンのうち(web4, web5)、1つめ(web4)=
PS C:\> Get-AzureVM -ServiceName cs-web -Name web4 | Add-AzureEndpoint -Name WebEP -Protocol tcp -LocalPort 80 -PublicPort 80 -ProbeProtocol http -ProbePath 'probe.htm' -ProbePort 80 -InternalLoadBalancerName web-ilb -LBSetName webLBSet | Update-AzureVM
=
=Sample = 2つの仮想マシン(web4, web5)のうち、2つめ(web5)=
PS C:\> Get-AzureVM -ServiceName cs-web -Name web5 | Add-AzureEndpoint -Name WebEP -Protocol tcp -LocalPort 80 -PublicPort 80 -ProbeProtocol http -ProbePath 'probe.htm' -ProbePort 80 -InternalLoadBalancerName web-ilb -LBSetName webLBSet | Update-AzureVM
=

なお、仮想マシン作成時に、その仮想マシンをILBに追加するには
New-AzureInternalLoadBalancerConfig
コマンドで、仮想マシン作成前にILBを作っておく。

Microsoft Message Analyzer

Microsoft Network Monitor の後継。

Operating Guide

Download


Azure Load Balancer、負荷分散アルゴリズム

Algorithmは、

Add-AzureEndpoint, Set-AzureEndpoint
などで指定。

=== 該当箇所コピペ ===
-LoadBalancerDistribution<String>

Specifies the load balancer distribution algorithm. Valid values are:

-- sourceIP: 2 tuple affinity (Source IP, Destination IP)
-- sourceIPProtocol: 3 tuple affinity (Source IP, Destination IP, Protocol)
-- none: 5 tuple affinity (Source IP, Source Port, Destination IP, Destination Port, Protocol)

The default value is none.
===

Round-Robin(ラウンドロビン)だと書かれた書籍やblogを見かけますが、それらは間違っているのでしょう。将来、ラウンドロビンもアルゴリズムに追加されるかもしれませんが、今のところは・・・。

2015/01/15

Microsoft Azure Files サービスの概要

REST APIの他、SMBもしゃべれるので、net use コマンドでマウントできる。

http://blogs.msdn.com/b/windowsazurej/archive/2014/06/05/blog-introducing-microsoft-azure-file-service.aspx

=== 一部、コピペ ===
2. Active Directory による認証はサポートされていますか。

AD による認証、または ACL は、現時点ではサポートされていませんが、今後サポートされる予定です。今のところ、認証、およびファイル共有への認証済みアクセスには Azure Storage アカウント キーが使用されます。
===