ssh -i <ダウンロードした秘密キー・ファイル> ubuntu@<DNSに登録したホスト名>
% ssh -i ssh-rvs-proxy.key ubuntu@ホスト名
The authenticity of host 'ordsmcp****.f5.si (143.***.***.145)' can't be established.
ED25519 key fingerprint is SHA256:wrxUaOWKPbuHoNH0C1nlZTTZLQ7fJ2HNvsUOtsjNS2I.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'ordsmcp****.f5.si' (ED25519) to the list of known hosts.
Welcome to Ubuntu 24.04.3 LTS (GNU/Linux 6.14.0-1016-oracle x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Wed Dec 24 07:25:06 UTC 2025
System load: 0.01 Processes: 124
Usage of /: 4.3% of 44.07GB Users logged in: 0
Memory usage: 23% IPv4 address for ens3: 10.0.0.135
Swap usage: 0%
Expanded Security Maintenance for Applications is not enabled.
0 updates can be applied immediately.
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
The list of available updates is more than a week old.
To check for new updates run: sudo apt update
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
ubuntu@rvs-proxy:~$
ubuntu@rvs-proxy:~$ sudo -s
root@rvs-proxy:/home/ubuntu#
apt-add-repository universe
root@rvs-proxy:/home/ubuntu# apt-add-repository universe
Adding component(s) 'universe' to all repositories.
Press [ENTER] to continue or Ctrl-c to cancel.
Hit:1 http://iad-ad-3.clouds.archive.ubuntu.com/ubuntu noble InRelease
Get:2 http://iad-ad-3.clouds.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:3 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:4 http://iad-ad-3.clouds.archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
[中略]
Get:52 http://iad-ad-3.clouds.archive.ubuntu.com/ubuntu noble-backports/restricted amd64 Components [216 B]
Get:53 http://iad-ad-3.clouds.archive.ubuntu.com/ubuntu noble-backports/restricted amd64 c-n-f Metadata [116 B]
Get:54 http://iad-ad-3.clouds.archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 Components [212 B]
Get:55 http://iad-ad-3.clouds.archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 c-n-f Metadata [116 B]
Fetched 39.2 MB in 20s (1970 kB/s)
Reading package lists... Done
root@rvs-proxy:/home/ubuntu#
apt install -y nginx libnginx-mod-http-headers-more-filter
root@rvs-proxy:/home/ubuntu# apt install -y nginx libnginx-mod-http-headers-more-filter
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
nginx-common
Suggested packages:
fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
libnginx-mod-http-headers-more-filter nginx nginx-common
0 upgraded, 3 newly installed, 0 to remove and 64 not upgraded.
Need to get 577 kB of archives.
[中略]
Running kernel seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
root@rvs-proxy:/home/ubuntu#
snap install --classic certbot
root@rvs-proxy:/home/ubuntu# snap install --classic certbot
certbot 5.2.2 from Certbot Project (certbot-eff✓) installed
root@rvs-proxy:/home/ubuntu#
iptablesを実行して、ポート80および443への接続許可を与えます。
iptables -I INPUT 5 -p tcp --dport 80 -m conntrack --ctstate NEW -j ACCEPT
iptables -I INPUT 6 -p tcp --dport 443 -m conntrack --ctstate NEW -j ACCEPT
iptables -L INPUT -n --line-numbers
netfilter-persistent save
netfilter-persistent reload
root@rvs-proxy:/home/ubuntu# iptables -L INPUT -n --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 ACCEPT 1 -- 0.0.0.0/0 0.0.0.0/0
3 ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT 6 -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
5 REJECT 0 -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
root@rvs-proxy:/home/ubuntu# iptables -I INPUT 5 -p tcp --dport 80 -m conntrack --ctstate NEW -j ACCEPT
root@rvs-proxy:/home/ubuntu# iptables -I INPUT 6 -p tcp --dport 443 -m conntrack --ctstate NEW -j ACCEPT
root@rvs-proxy:/home/ubuntu# iptables -L INPUT -n --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 ACCEPT 1 -- 0.0.0.0/0 0.0.0.0/0
3 ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT 6 -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
5 ACCEPT 6 -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 ctstate NEW
6 ACCEPT 6 -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 ctstate NEW
7 REJECT 0 -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
root@rvs-proxy:/home/ubuntu# netfilter-persistent save
run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables save
run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables save
root@rvs-proxy:/home/ubuntu# netfilter-persistent reload
run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables start
run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables start
root@rvs-proxy:/home/ubuntu#
すでにnginxが実行されています。nginxのドキュメント・ルートのデフォルトは/var/www/htmlです。
certbot certonly \
--webroot \
-w /var/www/html \
-d [ホスト名] \
--email [自分のメールアドレス] \
--agree-tos \
--no-eff-email
root@rvs-proxy:/home/ubuntu# certbot certonly \
--webroot \
-w /var/www/html \
-d ordsmcp****.f5.si \
--email y***********@oracle.com \
--agree-tos \
--no-eff-email
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for ordsmcp****.f5.si
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/ordsmcp****.f5.si/fullchain.pem
Key is saved at: /etc/letsencrypt/live/ordsmcp****.f5.si/privkey.pem
This certificate expires on 2026-03-24.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
root@rvs-proxy:/home/ubuntu#
nginxの設定ファイルを置き換えます。
root@rvs-proxy:/etc/nginx# mkdir /etc/nginx/default.d
root@rvs-proxy:/etc/nginx#
/etc/nginx/default.d/01-apex-adb.confとして、以下のファイルを配置します。変数$ords_upstream_hostに、上流となるAutonomous AI Databaseを指定します。
root@rvs-proxy:/etc/nginx# nginx -s reload
2025/12/24 08:18:24 [notice] 4868#4868: signal process started
root@rvs-proxy:/etc/nginx#
次の記事の作業を実施していることを前提として、Oracle IAMをIdM、Autonomous AI DatabaseをバックエンドとしたリモートMCPサーバーに、Claude Desktopから繋いでみます。
root@rvs-proxy:/etc/nginx# cd /usr/share/nginx/html
root@rvs-proxy:/usr/share/nginx/html#
root@rvs-proxy:/usr/share/nginx/html# mkdir .well-known
root@rvs-proxy:/usr/share/nginx/html#
ファイル.well-known/oauth-protected-resourceを作成します。resource、authorization_serversともに、ドメインURLを設定します。
{
"resource": "ドメインURL",
"authorization_servers": [
"ドメインURL"
]
}
curl -O https://ドメインURL/.well-known/openid-configuration
mv openid-configuration .well-known/oauth-authorization-server
root@rvs-proxy:/usr/share/nginx/html# curl -O https://idcs-***************.identity.oraclecloud.com:443/.well-known/openid-configuration
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3166 100 3166 0 0 30149 0 --:--:-- --:--:-- --:--:-- 30442
root@rvs-proxy:/usr/share/nginx/html# mv openid-configuration .well-known/oauth-authorization-server
root@rvs-proxy:/usr/share/nginx/html#
最後にnginxの自動起動を有効にします。
root@rvs-proxy:/usr/share/nginx/html# systemctl enable nginx
Synchronizing state of nginx.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable nginx
root@rvs-proxy:/usr/share/nginx/html#



















