# 踏み台サーバーを作る

外部から内部のデータベースに接続する際に、そのDBは不正アクセスのターゲットとなる可能性があり、セキュリティ上好ましくありません。そこでDashcombではSSH接続を踏み台サーバーからのみ許可することで、接続元のIPアドレスを制限し不正アクセスのリスクを軽減できます。

## 準備

* Dashcomb以外のところでDashcombがサポートしているデータベースを作成しておきます。
* 内部データベースにアクセス用の踏み台サーバを用意します。

## 実現

<figure><img src="/files/uKMgPDJwe8V78A3P73JQ" alt=""><figcaption></figcaption></figure>

* [Data Source接続の設定](https://github.com/dashcomb/gitbook-doc/blob/master/tips-and-tricks/broken-reference/README.md)ページで作成済みのデータベースを選びます。
* 「SSH経由」お勧めしているので、ONにしてください。
* 踏み台サーバの「SSHホスト」を入力します。
* 踏み台サーバの「SSHポート」を入力します。
* 踏み台サーバの「ユーザー」を入力します。
* 「キータイプ」は「ED25519」か「RSA」を選びます。
* 「公開鍵」をコピーして、`~/.ssh/authorized_keys` に追加します。
* 「接続テスト」ボタンをクリックして、「成功しました」の結果を確認します。
* 「保存」ボタンを押すと、踏み台サーバーの接続を作成しました。

## 参照項目

* [データベースへの接続](/dashcomb-help-center/ide/others/dtassu/database.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dashcomb.com/dashcomb-help-center/tips-and-tricks/make-a-proxy-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
