- Windows XP および、Office 2003 のサポート終了についてのご案内
https://www.microsoft.com/ja-jp/windows/lifecycle/sp3eos.aspx
ですが、おそらくまだ職場でWindowsXPを使っている人はいると思います。
Windows7などに買い替えるのが最もよい方法とは思いますが、
できるだけセキュリティリスクを減らすために、Proxyサーバで制御をかけます。
(例えば、野良XPがいきなり社内LANにつながった時など)
きっかけは某セキュリティスペシャリストの方にWindowsXPからの
通信をsquidで制御できるんじゃないのと言われたことから始まりました。
そこでできるかどうかが気になったので、自宅環境で検証してみました。
自宅の検証環境は以下のような感じですが、実際に使用しているのは、
Windows7のノートPC1台だけです。
Windows7 :ノートPC
Proxy(squid):CentOS6.5 (VMWarePlayer)
WindowsXP :Windows XP Mode (Windows Virtual PC)
クライアントの全てのWeb通信をProxy経由で行うようにします。

某セキュリティスペシャリストの方にかなり調べていただきました。
ありがとうございます!以下、原文になります。
>>>
[セキュリティ]サポート終了したWindowsのインターネットアクセスを制限する方法
acl aclname browser [-i] regexp ...
http://www.squid-cache.org/Doc/config/acl/
# pattern match on User-Agent header (see also req_header below) [fast]
http://msdn.microsoft.com/ja-jp/library/ms537503%28v=vs.85%29.aspx
MSIE 7.0 Internet Explorer 7 MSIE 7.0b Internet Explorer 7 (Beta 1 プレリリース バージョンのみ) MSIE 6.0 Internet Explorer 6 MSIE 6.0b Internet Explorer 6 (プレリリース) MSIE 5.5 Internet Explorer 5.5 MSIE 5.01 Internet Explorer 5.01 MSIE 5.0 Internet Explorer 5 MSIE 5.0b1 Internet Explorer 5 (プレリリース) MSIE 4.01 Internet Explorer 4.01
また、組み合わせは以下より情報をいただきました。
XP+IEは2014年4月8日
Vista+IE7は、2017年4月11日
Vista+IE8は、2020年1月14日
>>>現在サポートされているWindows XP以降のクライアント向けOSのサポート終了日、そのOS上で動作するブラウザは以下の通りとなります。
User-AgentのOS状況
http://msdn.microsoft.com/ja-jp/library/ms537503%28v=vs.85%29.aspx
Windows NT 5.1 Windows XP
Windows NT 5.01 Windows 2000, Service Pack 1 (SP1)
Windows NT 5.0 Windows 2000
Windows NT 4.0 Microsoft Windows NT 4.0
Windows 98; Win 9x 4.90 Windows Millennium Edition (Windows Me)
Windows 98 Windows 98
Windows 95 Windows 95
Windows CE Windows CE 以下より、
acl user-agent browser regexp "/etc/squid/user-agent.txt"
http://networklinuxcisco.blog49.fc2.com/blog-entry-4.html
http_access deny user-agent「/etc/squid/user-agent.txt」に拒否するユーザエージェントの文字列を正規表現にて記載します。
MSIE 5\.0
MSIE 5\.5
MSIE 6\.0
Mozilla\/3\.0ここに、URL Redirectの設定がブラウザベースで記載されている
###################################
# we redirect mobiles to mobile.mysite.com
url_rewrite_program /etc/squid/redirect_mobile.shacl symbian browser Symbian
acl iphone browser iP(hone|od)
acl mobile_url dstdomain mobile.monsite.comurl_rewrite_access deny mobile_url
http://positon.org/squid-26-redirection
url_rewrite_access allow symbian
url_rewrite_access allow iphone
url_rewrite_access deny allなので
acl user-agent browser regexp "/etc/squid/user-agent.txt"
url_rewrite_program /etc/squid/redirect_unsupportos.sh
url_rewrite_access allow user-agent
url_rewrite_access deny all/etc/squid/user-agent.txtに
MSIE 4\.0
MSIE 5\.0
MSIE 5\.5
MSIE 6\.
compatible
Mozilla\/3\.0
Windows NT 5\.
Windows 9redirect_unsupportos.sh
#!/bin/sh
while read line
do
echo "301:http://localdomain/xp_support_end "
done
※プラットフォームトークンのWindows NT 5.2は、Windows XPの64bitとWindows Server 2003が一緒なので、上記設定を使う場合は、クライアントにWindows Server 2003が無いことが条件になります。
実際に通信してみたところ、WindowsXPで通信の制御を行うことができました。
自宅環境に原因があると思うのですが、リダイレクトの処理はうまくいきませんでした。
これは後日、じっくり調べたいと思います。
以下のコマンドを実行して通信時のsquidのデバッグログを取得しました。
# squid -k debug
※このコマンドを実行するとかなりの量のログがとれます。2,3回プロキシ経由で通信したら
cache.logがかなりの容量になってしまいました。
いっぱい取れたデバッグログのうち、一部を以下に記載します。
■WindowsXPで通信した時のデバッグログ
2014/03/05 23:06:48.122| ACLChecklist::preCheck: 0x1b484b8 checking 'url_rewrite_access allow user-agent'
2014/03/05 23:06:48.122| ACLList::matches: checking user-agent
2014/03/05 23:06:48.122| ACL::checklistMatches: checking 'user-agent'
2014/03/05 23:06:48.122| aclRegexData::match: checking 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)'
2014/03/05 23:06:48.122| aclRegexData::match: looking for 'regexp'
2014/03/05 23:06:48.122| aclRegexData::match: looking for 'compatible'
2014/03/05 23:06:48.122| aclRegexData::match: match 'compatible' found in 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)'
2014/03/05 23:06:48.122| ACL::ChecklistMatches: result for 'user-agent' is 1
2014/03/05 23:06:48.122| ACLList::matches: result is true
- acl user-agentにマッチしました。
2014/03/05 23:06:48.123| redirectHandleRead: {301:http://192.168.0.10/xp_support_end}
2014/03/05 23:06:48.123| clientRedirectDone: 'http://isearch.avg.com/search?cid={92C0A9A0-B5FA-4666-AA3E-8468500830E5}&mid=46e603d010b947d09f56d14ab9eab17c-1d89aade1dff4d4d9f2d896766c1c27f194cba33&lang=ja&ds=AVG&pr=fr&d=2012-10-25%2023:03:06&v=15.4.0.5&pid=avg&sg=0&sap=dsp&q=bbb' result=301:http://192.168.0.10/xp_support_end
2014/03/05 23:06:48.123| client_side_request.cc(1311) doCallouts: Doing calloutContext->clientAccessCheck2()
2014/03/05 23:06:48.123| client_side_request.cc(547) clientAccessCheck2: No adapted_http_access configuration.
2014/03/05 23:06:48.123| The request GET http://isearch.avg.com/search?cid={92C0A9A0-B5FA-4666-AA3E-8468500830E5}&mid=46e603d010b947d09f56d14ab9eab17c-1d89aade1dff4d4d9f2d896766c1c27f194cba33&lang=ja&ds=AVG&pr=fr&d=2012-10-25%2023:03:06&v=15.4.0.5&pid=avg&sg=0&sap=dsp&q=bbb is ALLOWED, because it matched 'user-agent'
- そのあとにリダイレクト処理が始まりましたが、
自宅環境だとリダイレクト先がうまく表示されませんでした。
(ログが多すぎてどこを切り取っていいかわからない… )
■Windows7で通信した時のデバッグログ
2014/03/05 23:07:00.379| ACLChecklist::preCheck: 0x1b484b8 checking 'url_rewrite_access allow user-agent'
2014/03/05 23:07:00.379| ACLList::matches: checking user-agent
2014/03/05 23:07:00.379| ACL::checklistMatches: checking 'user-agent'
2014/03/05 23:07:00.379| aclRegexData::match: checking 'Mozilla/5.0 (Windows NT 6.1; rv:27.0) Gecko/20100101 Firefox/27.0'
2014/03/05 23:07:00.379| aclRegexData::match: looking for 'regexp'
2014/03/05 23:07:00.379| aclRegexData::match: looking for 'compatible'
2014/03/05 23:07:00.379| aclRegexData::match: looking for 'MSIE 4\.0'
2014/03/05 23:07:00.379| aclRegexData::match: looking for 'MSIE 5\.0'
2014/03/05 23:07:00.379| aclRegexData::match: looking for 'MSIE 5\.5'
2014/03/05 23:07:00.379| aclRegexData::match: looking for 'MSIE 6\.'
2014/03/05 23:07:00.379| aclRegexData::match: looking for 'Mozilla\/3\.0'
2014/03/05 23:07:00.379| aclRegexData::match: looking for 'Windows NT 5\.'
2014/03/05 23:07:00.379| aclRegexData::match: looking for 'Windows 9'
2014/03/05 23:07:00.379| ACL::ChecklistMatches: result for 'user-agent' is 0
2014/03/05 23:07:00.379| ACLList::matches: result is false
- acl user-agentにマッチしませんでした。
ですから、そのままInternet上のWebページを見ることができます。
上記設定ですとWindowsXPは何もできなくなってしまいますので、
せめて自社ネットワークだけにでもつなげられる方法を調べます。
また、今回はsquidでしたが、apacheのプロキシでも同じことを
試しましたので、近々アップします。