4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【ADB】プライベート・サブネット上のAutonomous DatabaseのDatabase Actionsに踏み台Compute経由で接続

Last updated at Posted at 2025-10-06

プライベート・サブネット上のAutonomous DatabaseのDatabase Actionsに、パブリック・サブネットに構築された踏み台Compute経由で接続する際のメモ。

接続構成イメージ

[User PC]
│ HTTPS (port 443)

[Bastion Host] (Public Subnet)
│ SSH Tunnel or Proxy

[Autonomous Database] (Private Subnet)

手順

0. NW設定を確認

*Bastion 側(Public Subnet)Security List / NSG の設定

Type Protocol Port Range Source CIDR 説明
Ingress TCP 22 xxx.xxx.xxx.xxx/32 アクセス元のNWを許可
Egress All All 0.0.0.0/0

*ADB 側(Private Subnet)Security List / NSG の設定

Type Protocol Port Range Source CIDR 説明
Ingress TCP 443 <BastionのPrivate IP>/32もしくはSubnet全体 BastionからのHTTPS通信を許可
Egress All All 0.0.0.0/0

1. SSH動的フォワードを張る

書式
ssh -i <key> -D 1080 ubuntu@ <bastion-public-ip>

※必要に応じてユーザー名(ここではubuntu)を変更

ssh -i ~/.ssh/id_rsa -D 1080 ubuntu@138.2.XX.XX

2. ブラウザでDatabase Actionsに接続

ブラウザ上でプロキシ設定をする。

  • SOCKS5 プロキシ: localhost:1080

「Autonomous Database」の詳細ページから「データベース・アクション」をクリックし、アクセスURLを確認します。

image.png

アクセスできました!

image.png

*上手くいかない時の疎通確認コマンド

nc -zv 10.0.1.XX 443 #Bastion に SSH ログインした状態で、ADB へのポート 443 が開いているか確認

netstat -ano | findstr 8443 #SSHトンネルが実際に開いているか確認
4
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?