Oracle Cloud デザイン・パターン -Oracle Net over SSH-
-
date post
16-Apr-2017 -
Category
Technology
-
view
317 -
download
5
Transcript of Oracle Cloud デザイン・パターン -Oracle Net over SSH-
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |Copyright © 2016 Oracle and/or its affiliates. All rights reserved. |
Oracle Cloud デザイン・パターン-Oracle Net over SSH-
2016年 7月 27日日本オラクル株式会社クラウド・テクノロジー事業統括黒田壮大
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 2
Safe Harbor StatementThe following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 3
Document Control• 本資料は、 Oracle Database 12cR1 ならびに Database Cloud Service
16.3.1 を前提に説明します–製品・サービスのアップデートに伴い、内容が変更される可能性があります–最新情報は、各製品・サービスのマニュアルやドキュメントをご確認下さい
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 4
Document ControlDate Version 変更箇所2016/08 1.0 DB 12.1 + DBCS 16.3.1 で資料作成
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
アーキテクチャー設計時に生じる典型的な課題(例)
• 「 22 番ポートが空いており、 SSH でアクセスができるのは理解した。で、 SQL*Net で外部からアクセスしたい場合には、どうすれば良いの?」
5
Oracle Cloud を検討してくれているお客様の声(想像)
設計課題
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• 解決したい課題– SQL*Plus などのクライアント・アプリ
ケーションがオンプレミス環境にある場合、どのように Oracle Cloud に接続すべきでしょうか。
– その場合、オンプレミス環境のファイアウォールについても考慮する必要があります。
Oracle Net over SSH
TCP/22 TCP/1521
6
設計ガイド
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 7
• Oracle Cloud での解決方法– SSH ポート・フォワーディングを使用し
ます。– Oracle Database Cloud の TCP/22 に接
続し、 Oracle Database Cloud 内のSSH デーモンが Oracle Database Cloudの TCP/1521 にリクエストを転送します。
• メリット– 公開鍵暗号などの SSH の認証機能が使えます。– すべての通信が暗号化されます。
• 補足事項– オンプレミス環境のファイアウォールが
Outbound TCP/22 を許可している必要があります。
– TCP/1521 に直接接続することも可能ですが、TCP/1521 への接続はディフィー・ヘルマン鍵共有によって暗号化されているものの、デフォルトではパスワード認証しか使用できません。公開鍵暗号を使用するには SSL 認証を構成する必要があります。
Oracle Net over SSH
sqlplus ssh sshd tnslsnr
オンプレミス環境 Oracle Database Cloud
設計ガイド
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle Public Cloud アイデンティティ・ドメインCompute Cloud Service
Database Cloud Service インスタンス
Oracle Cloud インスタンスへの接続の概念図
8
インスタンス 1sshd22
443
1521
5500
Oracle Cloud Database Monitor
Oracle Application Express
Oracle GlassFish Server
Oracle Enterprise Manager1158
4848
SQL*Net Listener
22
443
1521
5500
1158
4848
Java Cloud Service イン
スタンス
22 443 …
Compute Cloud インス
タンス
クライアント
インターネット
ターミナル
ブラウザ
SQL Developer
SQL*Plus80
22
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
社内ネットワークから Oracle Public Cloud への SSH アクセス
• Oracle Database Cloud Service の管理にあたって、 SSH 接続が必要になります。
• 通常 SSH 接続は、クライアントから直接サーバへ接続できる環境で行いますが、社内 LAN など「インターネットとの接続は必ずプロキシ経由としている」という環境から接続する場合、プロキシ及びファイアウォールが許可しているポート番号を使って、 SSH でリモートログインする必要があります。
• プロキシやファイアウォールによっては、インターネットゾーンに対する 22 番ポートのアウトバウンド通信を許可していない場合があります。そのような場合には、ネットワーク管理者に依頼して、 Oracle Cloud への 22 番ポート経由のアクセスを許可してもらう必要があります。
9
インターネット
クライアント Oracle Database Cloud インスタン
ス
22アプリSSH
Proxy / Firewall
proxy.mycompany.com
80/443 22
プロキシサーバーからの 22 番ポートのアウトバウンド通信が許可されている必要があります
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 10
SSH トンネリング設定方法
ssh にはポートフォワード (port forward) という機能があります。ssh ポート( 22 番ポート)を経由して、セキュアにリモートサーバの他のポートと接続可能ssh なので、通信も暗号化されており、セキュリティの面でも優れています。
ローカル PC
DBクライアン
ト
任意のポート(例: 18443)
SSH ポート( 22 番ポート )
Cloudインスタンス
OracleDatabase
SSH ポート( 22 番ポート )
OracleDB(例: 1521 ポート )
①
②
③
④⑤
① :ローカル PC 側の空いているポートへアクセス② :ローカル PC 側の空いているポートから SSH ポート 22 番へフォワード③ : Cloud インスタンス側へは SSH22 番ポートで通信 注:このポートで常時セッション接続状態にしておく④ : SSH ポートから DB 接続用ポートへフォワード⑤ : 1521 ポートで Database へ接続
① ~⑤までの設定は Putty 等を使って設定可能
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
[Step1] SSH トンネリング機能の設定方法
11
[1-1] SQL Developer における SSH トンネリングの設定例
構築ガイドOracle Net over SSH
1. 接続プロパティの「 Advanced 」メニューより、 SSH トンネリングを直接設定します。
Use SSH: チェックHost : 接続する DB インスタンスの Public IPPort: 22Username: opcUse Key File: チェックKey File: インスタンス作成時に登録した SSH 公開鍵のペアとなる秘密鍵ファイルを選択
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
TCP/1521 への直接アクセスの設定
12
Step 1
運用 TipsOracle Net over SSH
• デフォルトでブロックされている Oracle Database Cloud Service の各ポートに対しては、 Oracle Compute Cloud Service で「セキュリティ・ルール」を設定することにより、直接アクセスすることができるようになります。
• DCS インスタンスを作成した際に、以下のセキュリティ・ルールがデフォルトで作成されていますが、 SSH 以外は無効化されています。
ルール名称 ポート 使用サービス デフォルト
ora_p2_dbconsole 1158 EM 11g DB Control 無効
ora_p2_dbexpress 5500 EM DB Express 12c 無効
ora_p2_dblistener 1521 SQL*Net 無効
ora_p2_http 80 HTTP 無効
ora_p2_httpadmin 4848 Oracle GlassFIsh Server 無効
ora_p2_httpssl 443 HTTPS(REST, APEX,DBMonitor) 無効
ora_p2_ssh 22 SSH, SFTP 有効
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
TCP/1521 への直接アクセスの設定
13
Step 2
運用 TipsOracle Net over SSH
• デフォルト作成のルールを有効化することで、そのポートへのアクセスを許可できます。
1. アクセス許可をしたいポート(ora_p2_dblistener) のルールのメニューから「更新」を選択し、ステータスを「 Enabled 」に変更します
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle Cloud Service 30 日間無料トライアル
14
トライアルのお申し込みサイト
トライアルのお申し込みサイトはコチラ - 上記サイトより、ご利用したいクラウドサービスを選択し、お申し込み頂けます。- Oracle PaaS の各サービスは「プラットフォームとインフラ」項目をご参照ください。
https://cloud.oracle.com/ja_JP/tryit
Database Cloud トライアル申し込みご案内
お申し込みは数ステップでカンタン! 30 日間お試し放題!!
- Database Cloud Service のトライアルを申し込むと、 Database Backup Service や Java Cloud Service などもトライアル可能です!- 上記 FAQ サイトにてチュートリアルも提供しております:
- Oracle Database Cloud Serviceを使ってみよう- Oracle Database Cloud Service 体験チュートリアル - トライアル環境を使用したAPEXアプリケーション作成
DBCS の詳細なお申込み方法は FAQ にてご案内しております。
https://faq.oracle.co.jp/app/answers/detail/a_id/2809 へアクセス
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |