forfiles.exeをリソースキットから取り出すか以下からダウンロード
ftp://ftp.microsoft.com/ResKit/y2kfix/x86/
ダウンロードしたらsystem32フォルダへ格納
以下をテキストエディタへ記述してxxx.batで保存
forfiles -p削除ファイル格納フォルダフルパス -s -m*.txt -d-30 -c"CMD /C DEL @FILE"
-p削除ファイル格納フォルダフルパス
※-pと引数の間にスペースは入れない
-m*.txt ファイル検索オプションに"*.txt"を引き渡す
※-mと*の間にスペースは入れない
拡張子は任意のものに変更可能
-d-30
※日数又は日付オプション(30日前まで全て)
WinServer2K3以降に追加されたコマンド
VISTA,Win7,Server2k3,2k8用
forfiles /p 削除元ファイル格納フォルダフルパス /m *.txt /d -10 /c "CMD /C DEL @FILE"
/m *.txt ファイル検索オプションに"*.txt"を引き渡す
/d -10 日数又は日付オプション(10日前全て)
forfiles /p "移動元ファイル格納フォルダフルパス" /d MM/DD/YYYY /c "cmd /c move @path 移動先フォルダフルパス"
/d MM/DD/YYYY 日数又は日付オプション(YYYY/MM/DD以前)
参考:TechNet
XP以前はこちら
VISTA,Win7,Server2k3,2k8用
forfiles /p 削除元ファイル格納フォルダフルパス /m *.txt /d -10 /c "CMD /C DEL @FILE"
/m *.txt ファイル検索オプションに"*.txt"を引き渡す
/d -10 日数又は日付オプション(10日前全て)
forfiles /p "移動元ファイル格納フォルダフルパス" /d MM/DD/YYYY /c "cmd /c move @path 移動先フォルダフルパス"
/d MM/DD/YYYY 日数又は日付オプション(YYYY/MM/DD以前)
参考:TechNet
XP以前はこちら
配布サーバ及びERAサーバOS:Windows2003ServerR2 Std.
クライアントPC OS:WindowsXP Pro
【AntiVirusのインストール】
1.ESET NOD32 アンチウィルスのインストール中、「自動アップデート」ダイアログに発行されたユーザ名とパスワードを入力
※入力は配布ミラーサーバのみ、他のクライアントは入力不要(後で設定するオプションを選択)
2.他はデフォルト
※尚、早期警告システム及びヒューステリック機能の有効/無効は環境に準じて選択(接続するクライアントはここでの設定に合わせる)
3.ESET アップデートサーバからのアップデートが可能なことを確認する
【ERAのインストール】
1.事前に取得したライセンスキーファイルを任意のフォルダに保存
2.ESET リモートアドミニストレータサーバ(ERAS)のインストール中、ライセンスキーファイルの選択を行い、「アップデート」ダイアログに発行されたユーザ名とパスワードを入力
3.他はデフォルト
4.ESET リモートアドミニストレータコンソール(ERAC)をインストール
【ERA設定】
1.ERACを起動し、ERASに接続
2.NODクライアント(ミラーサーバ含む)のNODを起動
3.詳細モード → 設定 → 詳細設定のツリー全体を表示する
4.詳細ツリー → 設定 → その他 → リモート管理
5.「リモート管理サーバに接続する」にチェックを入れ、「サーバアドレス」エディットボックスにERASにIPアドレスを入力。
6.「ポート番号」に”2222”が入力されていることを確認し、「OK」BTNを押下
【ミラーサーバ構築】
1.ERACを起動
2.「ツール」メニュー → 「サーバオプション」 → 「アップデートタブ」
3.「アップデート用ユーザ名」・「アップデート用パスワード」を入力
4.「配布用アップデートを作成する」にチェックを入れる
5.「内蔵のHTTPサーバよりアップデートファイルを提供する」にチェックを入れる
【クライアントの設定】
1.クライアントのNODを起動
2.詳細モード → 設定 → 詳細設定のツリー全体を表示する
3.詳細ツリー → アップデート → 編集ボタン
4.「アップデートサーバ」に以下を入力し、「追加」ボタン押下 → 「OK」ボタン押下
http://ミラーサーバIPアドレス:2221
5.「アップデートサーバ」プルダウンメニューから項番4で入力したものを選択し 「OK」ボタン押下
クライアントPC OS:WindowsXP Pro
【AntiVirusのインストール】
1.ESET NOD32 アンチウィルスのインストール中、「自動アップデート」ダイアログに発行されたユーザ名とパスワードを入力
※入力は配布ミラーサーバのみ、他のクライアントは入力不要(後で設定するオプションを選択)
2.他はデフォルト
※尚、早期警告システム及びヒューステリック機能の有効/無効は環境に準じて選択(接続するクライアントはここでの設定に合わせる)
3.ESET アップデートサーバからのアップデートが可能なことを確認する
【ERAのインストール】
1.事前に取得したライセンスキーファイルを任意のフォルダに保存
2.ESET リモートアドミニストレータサーバ(ERAS)のインストール中、ライセンスキーファイルの選択を行い、「アップデート」ダイアログに発行されたユーザ名とパスワードを入力
3.他はデフォルト
4.ESET リモートアドミニストレータコンソール(ERAC)をインストール
【ERA設定】
1.ERACを起動し、ERASに接続
2.NODクライアント(ミラーサーバ含む)のNODを起動
3.詳細モード → 設定 → 詳細設定のツリー全体を表示する
4.詳細ツリー → 設定 → その他 → リモート管理
5.「リモート管理サーバに接続する」にチェックを入れ、「サーバアドレス」エディットボックスにERASにIPアドレスを入力。
6.「ポート番号」に”2222”が入力されていることを確認し、「OK」BTNを押下
【ミラーサーバ構築】
1.ERACを起動
2.「ツール」メニュー → 「サーバオプション」 → 「アップデートタブ」
3.「アップデート用ユーザ名」・「アップデート用パスワード」を入力
4.「配布用アップデートを作成する」にチェックを入れる
5.「内蔵のHTTPサーバよりアップデートファイルを提供する」にチェックを入れる
【クライアントの設定】
1.クライアントのNODを起動
2.詳細モード → 設定 → 詳細設定のツリー全体を表示する
3.詳細ツリー → アップデート → 編集ボタン
4.「アップデートサーバ」に以下を入力し、「追加」ボタン押下 → 「OK」ボタン押下
http://ミラーサーバIPアドレス:2221
5.「アップデートサーバ」プルダウンメニューから項番4で入力したものを選択し 「OK」ボタン押下
ip route default gateway pp 1 filter 500000 gateway pp 1
ip route 192.168.0.0/24 gateway tunnel 1
ip lan1 address 192.168.xxx.1/24
ip lan1 secure filter in 100000 100001 100002 100003 100004 100005 100006 100007 100099 200082 200083
provider type isdn-terminal
provider filter routing connection
provider lan1 name LAN:
provider lan2 name PPPoE/0/1/5/0/0/0:
pp select 1
pp name PRV/1/1/5/0/0/0:
pp keepalive interval 30 retry-interval=30 count=12
pp always-on on
pppoe use lan2
pppoe auto disconnect off
pppoe call prohibit auth-error count off
pp auth accept pap chap
pp auth myname ID@anonimous.jp pwd
ppp lcp mru on 1454
ppp ipcp ipaddress on
ppp ipcp msext on
ppp ccp type none
ip pp secure filter in 200003 200020 200021 200022 200023 200024 200025 200030 200032 200033 200080 200081 200082 200083 200099
ip pp secure filter out 200013 200020 200021 200022 200023 200024 200025 200026 200027 200033 200080 200081 200082 200083 200099 dynamic 200080 200081 200082 200083 200084 200098 200099
ip pp nat descriptor 1000
netvolante-dns hostname host pp server=1 yamaha.aax.netvolante.jp
pp enable 1
provider set 1
provider dns server pp 1 1
provider select 1
pp select 5
pp name WAN/VPN:test01
pp bind tunnel1
pp always-on on
pp auth accept mschap-v2
pp auth myname id01 pwd01
ppp ipcp ipaddress on
ppp ccp type mppe-any
ppp ipv6cp use off
pptp service type client
pp enable 5
tunnel select 1
tunnel encapsulation pptp
tunnel endpoint name test.aa0.netvolante.jp
pptp keepalive interval 30 12
tunnel enable 1
ip filter 100000 reject * * udp,tcp 135 *
ip filter 100001 reject * * udp,tcp * 135
ip filter 100002 reject * * udp,tcp netbios_ns-netbios_dgm *
ip filter 100003 reject * * udp,tcp * netbios_ns-netbios_dgm
ip filter 100004 reject * * udp,tcp netbios_ssn *
ip filter 100005 reject * * udp,tcp * netbios_ssn
ip filter 100006 reject * * udp,tcp 445 *
ip filter 100007 reject * * udp,tcp * 445
ip filter 100099 pass * * * * *
ip filter 200000 reject 10.0.0.0/8 * * * *
ip filter 200001 reject 172.16.0.0/12 * * * *
ip filter 200002 reject 192.168.0.0/16 * * * *
ip filter 200003 reject 192.168.xxx.0/24 * * * *
ip filter 200010 reject * 10.0.0.0/8 * * *
ip filter 200011 reject * 172.16.0.0/12 * * *
ip filter 200012 reject * 192.168.0.0/16 * * *
ip filter 200013 reject * 192.168.xxx.0/24 * * *
ip filter 200020 reject * * udp,tcp 135 *
ip filter 200021 reject * * udp,tcp * 135
ip filter 200022 reject * * udp,tcp netbios_ns-netbios_ssn *
ip filter 200023 reject * * udp,tcp * netbios_ns-netbios_ssn
ip filter 200024 reject * * udp,tcp 445 *
ip filter 200025 reject * * udp,tcp * 445
ip filter 200026 restrict * * tcpfin * www,21,nntp
ip filter 200027 restrict * * tcprst * www,21,nntp
ip filter 200030 pass * 192.168.xxx.0/24 icmp * *
ip filter 200031 pass * 192.168.xxx.0/24 established * *
ip filter 200032 pass * 192.168.xxx.0/24 tcp * ident
ip filter 200033 pass * 192.168.xxx.0/24 tcp ftpdata *
ip filter 200034 pass * 192.168.xxx.0/24 tcp,udp * domain
ip filter 200035 pass * 192.168.xxx.0/24 udp domain *
ip filter 200036 pass * 192.168.xxx.0/24 udp * ntp
ip filter 200037 pass * 192.168.xxx.0/24 udp ntp *
ip filter 200080 pass * 192.168.xxx.1 tcp * 1723
ip filter 200081 pass * 192.168.xxx.1 gre * *
ip filter 200082 reject * 192.168.xxx.11 * www
ip filter 200083 reject * 192.168.xxx.12 * www
ip filter 200098 reject-nolog * * established
ip filter 200099 pass * * * * *
ip filter 500000 restrict * * * * *
ip filter dynamic 200080 * * ftp
ip filter dynamic 200081 * * domain
ip filter dynamic 200082 * * www
ip filter dynamic 200083 * * smtp
ip filter dynamic 200084 * * pop3
ip filter dynamic 200098 * * tcp
ip filter dynamic 200099 * * udp
nat descriptor type 1000 masquerade
nat descriptor masquerade static 1000 1 192.168.xxx.100 tcp 5631 #pcAnywhere
nat descriptor masquerade static 1000 2 192.168.xxx.100 udp 5632 #pcAnywhere
nat descriptor masquerade static 1000 3 192.168.xxx.100 tcp 80
nat descriptor masquerade static 1000 4 192.168.xxx.100 tcp 8080
nat descriptor masquerade static 1000 5 192.168.xxx.1 tcp 1723
nat descriptor masquerade static 1000 6 192.168.xxx.1 gre
dhcp service server
dhcp server rfc2131 compliant except remain-silent
dhcp scope 1 192.168.xxx.11-192.168.xxx.20/24
dns server pp 1
dns server select 500001 pp 1 any . restrict pp 1
dns private address spoof on
dns private name setup.netvolante.jp
pptp service on
analog supplementary-service pseudo call-waiting
analog extension dial prefix line
analog extension dial prefix sip prefix="9#"
【RTX1100側】
ip route 192.168.xxx.0/24 gateway tunnel 1
tunnel select 1
tunnel encapsulation pptp
tunnel endpoint name yamaha.aax.netvolante.jp
pptp keepalive interval 30 12
tunnel enable 1
ip route 192.168.0.0/24 gateway tunnel 1
ip lan1 address 192.168.xxx.1/24
ip lan1 secure filter in 100000 100001 100002 100003 100004 100005 100006 100007 100099 200082 200083
provider type isdn-terminal
provider filter routing connection
provider lan1 name LAN:
provider lan2 name PPPoE/0/1/5/0/0/0:
pp select 1
pp name PRV/1/1/5/0/0/0:
pp keepalive interval 30 retry-interval=30 count=12
pp always-on on
pppoe use lan2
pppoe auto disconnect off
pppoe call prohibit auth-error count off
pp auth accept pap chap
pp auth myname ID@anonimous.jp pwd
ppp lcp mru on 1454
ppp ipcp ipaddress on
ppp ipcp msext on
ppp ccp type none
ip pp secure filter in 200003 200020 200021 200022 200023 200024 200025 200030 200032 200033 200080 200081 200082 200083 200099
ip pp secure filter out 200013 200020 200021 200022 200023 200024 200025 200026 200027 200033 200080 200081 200082 200083 200099 dynamic 200080 200081 200082 200083 200084 200098 200099
ip pp nat descriptor 1000
netvolante-dns hostname host pp server=1 yamaha.aax.netvolante.jp
pp enable 1
provider set 1
provider dns server pp 1 1
provider select 1
pp select 5
pp name WAN/VPN:test01
pp bind tunnel1
pp always-on on
pp auth accept mschap-v2
pp auth myname id01 pwd01
ppp ipcp ipaddress on
ppp ccp type mppe-any
ppp ipv6cp use off
pptp service type client
pp enable 5
tunnel select 1
tunnel encapsulation pptp
tunnel endpoint name test.aa0.netvolante.jp
pptp keepalive interval 30 12
tunnel enable 1
ip filter 100000 reject * * udp,tcp 135 *
ip filter 100001 reject * * udp,tcp * 135
ip filter 100002 reject * * udp,tcp netbios_ns-netbios_dgm *
ip filter 100003 reject * * udp,tcp * netbios_ns-netbios_dgm
ip filter 100004 reject * * udp,tcp netbios_ssn *
ip filter 100005 reject * * udp,tcp * netbios_ssn
ip filter 100006 reject * * udp,tcp 445 *
ip filter 100007 reject * * udp,tcp * 445
ip filter 100099 pass * * * * *
ip filter 200000 reject 10.0.0.0/8 * * * *
ip filter 200001 reject 172.16.0.0/12 * * * *
ip filter 200002 reject 192.168.0.0/16 * * * *
ip filter 200003 reject 192.168.xxx.0/24 * * * *
ip filter 200010 reject * 10.0.0.0/8 * * *
ip filter 200011 reject * 172.16.0.0/12 * * *
ip filter 200012 reject * 192.168.0.0/16 * * *
ip filter 200013 reject * 192.168.xxx.0/24 * * *
ip filter 200020 reject * * udp,tcp 135 *
ip filter 200021 reject * * udp,tcp * 135
ip filter 200022 reject * * udp,tcp netbios_ns-netbios_ssn *
ip filter 200023 reject * * udp,tcp * netbios_ns-netbios_ssn
ip filter 200024 reject * * udp,tcp 445 *
ip filter 200025 reject * * udp,tcp * 445
ip filter 200026 restrict * * tcpfin * www,21,nntp
ip filter 200027 restrict * * tcprst * www,21,nntp
ip filter 200030 pass * 192.168.xxx.0/24 icmp * *
ip filter 200031 pass * 192.168.xxx.0/24 established * *
ip filter 200032 pass * 192.168.xxx.0/24 tcp * ident
ip filter 200033 pass * 192.168.xxx.0/24 tcp ftpdata *
ip filter 200034 pass * 192.168.xxx.0/24 tcp,udp * domain
ip filter 200035 pass * 192.168.xxx.0/24 udp domain *
ip filter 200036 pass * 192.168.xxx.0/24 udp * ntp
ip filter 200037 pass * 192.168.xxx.0/24 udp ntp *
ip filter 200080 pass * 192.168.xxx.1 tcp * 1723
ip filter 200081 pass * 192.168.xxx.1 gre * *
ip filter 200082 reject * 192.168.xxx.11 * www
ip filter 200083 reject * 192.168.xxx.12 * www
ip filter 200098 reject-nolog * * established
ip filter 200099 pass * * * * *
ip filter 500000 restrict * * * * *
ip filter dynamic 200080 * * ftp
ip filter dynamic 200081 * * domain
ip filter dynamic 200082 * * www
ip filter dynamic 200083 * * smtp
ip filter dynamic 200084 * * pop3
ip filter dynamic 200098 * * tcp
ip filter dynamic 200099 * * udp
nat descriptor type 1000 masquerade
nat descriptor masquerade static 1000 1 192.168.xxx.100 tcp 5631 #pcAnywhere
nat descriptor masquerade static 1000 2 192.168.xxx.100 udp 5632 #pcAnywhere
nat descriptor masquerade static 1000 3 192.168.xxx.100 tcp 80
nat descriptor masquerade static 1000 4 192.168.xxx.100 tcp 8080
nat descriptor masquerade static 1000 5 192.168.xxx.1 tcp 1723
nat descriptor masquerade static 1000 6 192.168.xxx.1 gre
dhcp service server
dhcp server rfc2131 compliant except remain-silent
dhcp scope 1 192.168.xxx.11-192.168.xxx.20/24
dns server pp 1
dns server select 500001 pp 1 any . restrict pp 1
dns private address spoof on
dns private name setup.netvolante.jp
pptp service on
analog supplementary-service pseudo call-waiting
analog extension dial prefix line
analog extension dial prefix sip prefix="9#"
【RTX1100側】
ip route 192.168.xxx.0/24 gateway tunnel 1
tunnel select 1
tunnel encapsulation pptp
tunnel endpoint name yamaha.aax.netvolante.jp
pptp keepalive interval 30 12
tunnel enable 1
以下で定義データベースのミラーサーバ(192.168.1.251)を構築
NOD32 AntiVirus
ESET Remoto Administrator Server(ERAS)
ESET Remote Administrator Console(ERAC)
今日現在必要なホスト名及びIPアドレスのフィルタ定義を作成
url filter 121 pass a.nod32.com *
url filter 122 pass b.nod32.com *
url filter 123 pass exp01.eset.com *
url filter 124 pass exp02.eset.com *
url filter 125 pass redir01.eset.com *
url filter 126 pass ts00.eset.com *
url filter 127 pass ts01.eset.com *
url filter 128 pass ts02.eset.com *
url filter 129 pass ts03.eset.com *
url filter 130 pass ts04.eset.com *
url filter 131 pass ts05.eset.com *
url filter 132 pass ts06.eset.com *
url filter 133 pass ts07.eset.com *
url filter 134 pass ts08.eset.com *
url filter 135 pass ts09.eset.com *
url filter 136 pass tsm01.eset.com *
url filter 137 pass tsm02.eset.com *
url filter 138 pass um10.eset.com *
url filter 139 pass um11.eset.com *
url filter 140 pass um12.eset.com *
url filter 141 pass um13.eset.com *
url filter 142 pass um14.eset.com *
url filter 143 pass um15.eset.com *
url filter 144 pass um16.eset.com *
url filter 145 pass um17.eset.com *
url filter 146 pass um18.eset.com *
url filter 147 pass um19.eset.com *
url filter 148 pass suppreq.eset.eu *
url filter 149 redir01.eset.com
url filter 150 pass 82.165.143.243 *
url filter 151 pass 87.106.222.139 *
url filter 152 pass 87.106.240.241 *
url filter 153 pass 82.165.143.242 *
url filter 154 pass 87.106.131.195 *
url filter 155 pass 62.67.184.68 *
url filter 156 update.eset.com *
url filter 156 pass 89.202.149.36 *
url filter 157 pass 90.183.101.10
url filter 158 pass 93.184.71.27
url filter 159 pass update.eset.com
url pp filter out 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
NOD32 AntiVirus
ESET Remoto Administrator Server(ERAS)
ESET Remote Administrator Console(ERAC)
今日現在必要なホスト名及びIPアドレスのフィルタ定義を作成
url filter 121 pass a.nod32.com *
url filter 122 pass b.nod32.com *
url filter 123 pass exp01.eset.com *
url filter 124 pass exp02.eset.com *
url filter 125 pass redir01.eset.com *
url filter 126 pass ts00.eset.com *
url filter 127 pass ts01.eset.com *
url filter 128 pass ts02.eset.com *
url filter 129 pass ts03.eset.com *
url filter 130 pass ts04.eset.com *
url filter 131 pass ts05.eset.com *
url filter 132 pass ts06.eset.com *
url filter 133 pass ts07.eset.com *
url filter 134 pass ts08.eset.com *
url filter 135 pass ts09.eset.com *
url filter 136 pass tsm01.eset.com *
url filter 137 pass tsm02.eset.com *
url filter 138 pass um10.eset.com *
url filter 139 pass um11.eset.com *
url filter 140 pass um12.eset.com *
url filter 141 pass um13.eset.com *
url filter 142 pass um14.eset.com *
url filter 143 pass um15.eset.com *
url filter 144 pass um16.eset.com *
url filter 145 pass um17.eset.com *
url filter 146 pass um18.eset.com *
url filter 147 pass um19.eset.com *
url filter 148 pass suppreq.eset.eu *
url filter 149 redir01.eset.com
url filter 150 pass 82.165.143.243 *
url filter 151 pass 87.106.222.139 *
url filter 152 pass 87.106.240.241 *
url filter 153 pass 82.165.143.242 *
url filter 154 pass 87.106.131.195 *
url filter 155 pass 62.67.184.68 *
url filter 156 update.eset.com *
url filter 156 pass 89.202.149.36 *
url filter 157 pass 90.183.101.10
url filter 158 pass 93.184.71.27
url filter 159 pass update.eset.com
url pp filter out 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159