ASAのfqdnオブジェクト
- object network オブジェクト名内で,fqdn に続いてホスト名を指定する.
- 前もって dns domain-lookup ネームサーバのいるインターフェース名 および dns server-group DefaultDNS 内でname-server IP と domain-name によりドメイン名を定義しておく必要がある.
- fqdn で指定したホスト名がIPアドレスに解決されるタイミングは, オブジェクトがaccess-listに登場したとき.
- access-listに登場している object-group でない場合, object-group に network-object object で追加できない.
- どのIPに解決されたかは, show access-list および show dns で確認できる
- IPに解決できないfqdnを持つオブジェクトがaccess-listにある場合, そのリストはshow access-list では (inactive)として表示される.
XeroxプリンタドライバのLPRポートサイレントインストール
- プリンタドライバファイルを展開しフォルダに収納する. INFファイルの中に Model sections 項目があるのでドライバ名を確認する.
- OSの言語は %WINDIR%\System32\Printing_Admin_Scripts にある
- LPRポートの定義とその設定は, その言語フォルダの下にある prnport.vbs が行う.
- ドライバのインストールは, rundll32 printui.dll,PrintUIEntry /if /b プリンタの名称 /f ドライバを展開したフォルダ\INFファイル.inf /r prnport.vbsで設定したポート名 /m "INFファイル中のプリンタドライバ名" /u /z
- rundll32 printui.dll,PrintUIEntry /dl /n プリンタ名 /q は, 既に存在しているプリンタの削除.
- rundll32 printui.dll,PrintUIEntry /dd /n "プリンタドライバ名" /q は, 既に存在しているドライバの削除.
@echo off cd /d %~dp0 for /f "usebackq" %%i in (`dir /b %WINDIR%\System32\Printing_Admin_Scripts\`) do set lng=%%i set pport=%WINDIR%\System32\Printing_Admin_Scripts\%lng%\prnport.vbs rundll32 printui.dll,PrintUIEntry /dl /n Printer-Name /q rundll32 printui.dll,PrintUIEntry /dd /m "Printer Driver Name" /q cscript %pport% -d -r lpr-port cscript %pport% -a -h IP-ADDR -r lpr-port -o lpr -me -y public -i 1 -q lp rundll32 printui.dll,PrintUIEntry /if /b Printer-Name /f Driver-Folder\INFfile.inf /r lpr-port /m "Printer Driver Name" /u /z
- cd /d %~dp0 は %0 で表されるバッチファイルのフルパスファイル名のうち, ドライブレターとパスを抜き出してディレクトリを変更すること. ドライブの変更 /d は対応していないOSがある.
- http://technet.microsoft.com/ja-jp/library/cc754352%28v=ws.10%29.aspx
- http://technet.microsoft.com/ja-jp/library/ee624057%28v=ws.10%29.aspx
- http://www.admintech.jp/wiki.cgi?page=rundll32.exe+printui.dll+PrintUIEntry+%A4%CE%BB%C8%A4%A4%CA%FD
Adobe Readerのサイレントインストール
- ftp://ftp.adobe.com/pub/adobe/reader/win/11.x/11.0.09/ja_JP/AdbeRdr11009_ja_JP.exe をダウンロード
- AdbeRdr11009_ja_JP.exe /sAll /rps /rs /msi /norestart EULA_ACCEPT=YES SUPPRESS_APP_LAUNCH=YES を管理者権限でコマンドラインから実行する
- 再起動およびEULA関係などはスキップされる
OpenSSH 6.7 が古いクライアントから接続できない.
- CBCやarcfourなどが6.7から無効化されたため. サポート自体はまだ残っている.
- sshd_configに ssh -Q ciphers | paste -s -d , や ssh -Q kex | paste -s -d , の項目を追加して無効化されているアルゴリズムを有効にする.
- MACs は今回は関係がなかった. CihpersとKexAlgorithmsはどちらも必要.
Ciphers 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,arcfour128,arcfour256,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com #MACs hmac-sha1,hmac-sha1-96,hmac-sha2-256,hmac-sha2-512,hmac-md5,hmac-md5-96,hmac-ripemd160,hmac-ripemd160@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-md5-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org
nginx proxy_pass の末尾 / 有無による挙動の違い
- location /alpha/ で proxy_pass が http://proxy.host/ のように / で終る場合,/alpha/beta/index.html は,ロケーションである最初の/alpha/を除く beta/index.html を proxy_pass の後につけた http://proxy.host/beta/index.html になる
- proxy_pass が http://proxy.host のように / がない場合,/alpha/beta/index.html は,ロケーションを全て含み,http://proxy.host/alpha/beta/index.html になる.
- http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass
コマンドライン で Virus totalへファイルを送る方法
- VirusTotalにアカウントを作成し, 自分のAPIキーを調べておく.
- ファイル $filename を提出するには, curl -s -F "apikey=$apikey" -F "file=@$filename" https://www.virustotal.com/vtapi/v2/file/scan
- レポートを見るには, SHA256値を openssl dgst -sha256 等で計算させ, curl -s -F "apikey=$apikey" -F "resource=$sha256sum" https://www.virustotal.com/vtapi/v2/file/report
- 判定結果の数は "positives:" の要素