Windows Routing設定

とても初歩的ですが、時々触っては忘れるので…。

Routing確認

route print

Static route

コマンドプロンプトを管理者権限で起動する

  1. Windows キー
  2. 検索ボックスに cmd と入力
  3. Ctrl + Shift + Enter
  4. Alt + Y(Yesを選択)
route -p add 192.168.xxx.0 mask 255.255.255.0 10.xx.xx.xx

補足

 -p:OSの再起動後にもroute addのルートが保持される
 -f:route addによるルート追加前に現在の経路情報を全て削除する。基本使用しない。

参考
www.infraexpert.com

OpenSSL関連コマンドについて

備忘録。都度追記します。

外部から確認

※表示例です。CNは書き換えています。

$ openssl s_client -connect www.example.info:443 -showcerts
CONNECTED(00000003)
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA
verify return:1
depth=1 C = US, O = GeoTrust Inc., CN = RapidSSL SHA256 CA - G3
verify return:1
depth=0 CN = www.example.info
verify return:1
 ---
Certificate chain
 0 s:/CN=www.example.info
   i:/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA - G3
 -----BEGIN CERTIFICATE-----
 (略)
 -----END CERTIFICATE-----
 1 s:/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA - G3
   i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
 -----BEGIN CERTIFICATE-----
 (略)
 -----END CERTIFICATE-----
 ---
Server certificate
subject=/CN=www.example.info
issuer=/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA - G3
 ---
No client certificate CA names sent
Server Temp Key: ECDH, prime256v1, 256 bits
 ---
SSL handshake has read 2848 bytes and written 375 bytes
 ---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : (略)
    Session-ID: (略)
    Session-ID-ctx:
    Master-Key: (略)
    Key-Arg   : None
    Krb5 Principal: None
    PSK identity: None
    PSK identity hint: None
    TLS session ticket lifetime hint: 300 (seconds)
    TLS session ticket:
    (略)

    Start Time: 1446600549
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
 ---

0ならOK。20とか21なら設定、中間証明書などに問題がある。

さくらのVPSにRapidSSLを導入する(CentOS6.6+Apache+RapidSSL)

備忘録も兼ねて…ApacheのInstallは割愛します。

mod_sslのinstall

# yum -y install mod_ssl

CSR作成

秘密鍵作成

# cd /etc/pki/tls/certs/
# openssl genrsa -des3 -out server.key 2048
Generating RSA private key, 2048 bit long modulus
...............................+++
.................................................
.................................................
................+++
e is 65537 (0x10001)
Enter pass phrase for server.key: (←パスフレーズを入力)
Verifying - Enter pass phrase for server.key: (←パスフレーズを再入力)

CSR作成

※下記は入力例です

# openssl req -new -key server.key -out server.csr
Enter pass phrase for server.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
 -----
Country Name (2 letter code) [XX]:JP ←国名
State or Province Name (full name) :Osaka ←都道府県
Locality Name (eg, city) [Default City]:Osaka-shi ←市区町村
Organization Name (eg, company) [Default Company Ltd]: example.info ←組織名
※個人運営なのでドメイン名にしています(何でも良い)
Organizational Unit Name (eg, section) : ←部署名
Common Name (eg, your name or your server's hostname) :www.example.info ←ドメイン名
Email Address :webmaster@example.info ←メールアドレス

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password : ←空Enter
An optional company name : ←空Enter

CSRの内容確認

# openssl req -text -noout -in server.csr
Certificate Request:
    Data:
        Version: 0 (0x0)
        Subject: C=JP, ST=Osaka, L=Osaka-shi, O=example.info, CN=www.example.info/emailAddress=webmaster@example.info
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    (略)
                Exponent: 65537 (0x10001)
        Attributes:
            (略)
    Signature Algorithm: sha1WithRSAEncryption
         (略)

Subject: の行が合っていることと、Public-Key: の行が 2048 bitであることが確認できれば良い

証明書発行申請

サーバ証明書発行申請する際に、CSRを要求される。

# cat server.csr
 -----BEGIN CERTIFICATE REQUEST-----
 (略)
 -----END CERTIFICATE REQUEST-----

で表示される文字列をコピー、ペーストする

証明書ファイルの発行/確認

さくらインターネット社からの案内に従って対応し、証明書を発行。
発行された証明書(server.crt)ファイルをテキストエディタなどで開いてサーバに貼り付ける。

# cd /etc/pki/tls/certs/
# vi server.crt
 -----BEGIN CERTIFICATE-----
 (略)
 -----END CERTIFICATE-----

証明書の中身を確認する

# openssl x509 -text -noout -in server.crt
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: (略)
    Signature Algorithm: sha256WithRSAEncryption ←SHA-2(SHA256)の証明書
        Issuer: C=US, O=GeoTrust Inc., CN=RapidSSL SHA256 CA - G3
        Validity
            Not Before: Oct xx xx:xx:xx 2015 GMT ←開始日
            Not After : Nov  x xx:xx:xx 2018 GMT ←終了日
        Subject: CN=www.example.info ←ドメイン確認
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit) ←2048bitを確認
                Modulus:
                    (略)
                Exponent: (略)
        X509v3 extensions:
            X509v3 Authority Key Identifier:
                keyid:(略)

            Authority Information Access:
                OCSP - URI:http://gv.symcd.com
                CA Issuers - URI:http://gv.symcb.com/gv.crt

            X509v3 Key Usage: critical
                Digital Signature, Key Encipherment
            X509v3 Extended Key Usage:
                TLS Web Server Authentication, TLS Web Client Authentication
            X509v3 Subject Alternative Name:
                DNS:www.example.info, DNS:example.info ← ドメイン確認
            X509v3 CRL Distribution Points:

                Full Name:
                  URI:http://gv.symcb.com/gv.crl

            X509v3 Basic Constraints: critical
                CA:FALSE
            X509v3 Certificate Policies:
                Policy: 
                  CPS: https://www.rapidssl.com/legal

    Signature Algorithm: sha256WithRSAEncryption
         (略)

パスフレーズ応答を削除(Apache再起動の度に確認が来るため)

# openssl rsa -in server.key -out server.key
Enter pass phrase for server.key: ←パスフレーズ入力
writing RSA key

Apacheの設定変更

RapidSSLの中間証明書のインストール、SSL設定が必要
RapidSSLの中間証明書はGeoTtustのサイトにて取得
www.geotrust.co.jp
SHA-2の中間証明書を取得

中間証明書の作成

# vi /etc/pki/tls/certs/rapidssl-chain.crt
 -----BEGIN CERTIFICATE-----
 (略)
 -----END CERTIFICATE-----

先ほど取得した文字列をコピー、ペースト。

SSLの設定

# vi /etc/httpd/conf.d/ssl.conf
~以下を編集~
DocumentRoot "/var/www/html"
ServerName www.example.info:443
SSLProtocol all -SSLv2 -SSLv3
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/certs/server.key
SSLCertificateChainFile /etc/pki/tls/certs/rapidssl-chain.crt ※ 2019/03/24 記載漏れのため追記

Apacheの再起動

# service httpd configtest
Syntax OK
# service httpd restart
httpd を停止中:                                            [  OK  ]
httpd を起動中:                                            [  OK  ]

テストサイトを仮設置し、アクセスして確認。

Windows10でのGoogle日本語入力が既定のIMEにならない件

昨日Win10にUpdateしたが、日本語入力がMSのIMEから変わらない。
手動で切り替えても再起動すると元に戻ってしまう。

Windows 10 で発生している他社製 IMEの問題についてblogs.msdn.com

一旦Google日本語入力をアンインストールしてから、再インストール実施。
再インストールの際に既定のIMEに指定して再起動。
これでいけました。

不安な人はアンインストール前に辞書データをバックアップ
したほうが良いかもしれません。

(DNS) Negative Trust Anchors

参考になったのと。備忘録を兼ねて。
最近、DNSSECの話が挙がってたところへ丁度良いネタが。

@OrangeMorishita さんの自分用メモより

【自分用メモ】休暇中にNegative Trust AnchorがRFCになってた。// RFC 7646 - Definition and Use of DNSSEC Negative Trust Anchors https://tools.ietf.org/html/rfc7646

IETF(Internet Engineering Task Force)のRFC7646にあがってた。
RFC 7646 - Definition and Use of DNSSEC Negative Trust Anchors

ちょっと古いけど、JPRSドメイン名関連会議報告にて、こんなものが

Negative Trust Anchors

DNSSEC署名されたゾーンにおいて運用上の事故や設定ミスが発生した場合、DNSSEC検証を有効に設定しているキャッシュDNSサーバーでは、そのゾーンを含むドメイン名の名前検索ができなくなってしまうことがあります。今回のIETF 86では特定のドメイン名配下のDNSSEC検証をキャッシュDNSサーバー側で一時的に無効にするための「ネガティブトラストアンカー」を導入することで、それらの名前が検索できなくなってしまうことを防止するための仕組みが提案されました(draft-livingood-negative-trust-anchors)。

提案者は米Comcast社のJason Livingood氏とChris Griffiths氏です。同社ではDNSSEC検証を有効にしたキャッシュDNSサーバーを他社に先駈けて運用していますが、今回の提案からは同社がしばしば発生しているDNSSEC検証エラーに悩まされており(*2)、これを解決したいという現状がうかがえます。

(*2)
Comcast社はDNSSEC検証が失敗しているドメイン名の情報を、速報として公開しています(関連URIを参照)。

DNSSEC検証にコケているドメインが引けなくなるので、それを回避するのがNegative Trust Anchors。
でも、あくまで設定ミス?った先方に直して貰う必要はありますが…。

米国のISPComcastでは早々にDNSSECを有効化にしていて、検証に失敗しているものを公開(晒し上げ…?)しているようです。

bindだと9.11で実装予定みたいですね(rndc nta)
https://la51.icann.org/en/schedule/mon-tech/presentation-isc-bind-13oct14-en.pdf