FutureNet

NXR,VXRシリーズ

REST-API編

8. 各種サービス設定

8-21. SSLトンネル設定(ssl)

 処理概要

SSLトンネル設定に関する処理を実行します。

 

URIおよびメソッド

機能 Version URI メソッド
POST PUT GET DELETE
SSL Tunnel v2 /api/v2/ssl
/api/v2/ssl/tunnel
/api/v2/ssl/tunnel/{NUM}

凡例:〇対応、-未対応

  • api/v1は対応していません。

 

実行例

SSLトンネル設定の作成

メソッド URI
POST /api/v2/ssl/tunnel
JSON
リクエスト

POST /api/v2/ssl/tunnel
Content-Type: application/json

 

{
"tunnel": {
"number": 0,
"remote": {
"remote-address": {
"family": "ip",
"address": "smtp.example.com",
"port": 465
}
},
"listen": {
"listen-address": {
"family": "ip",
"address": "localhost",
"port": 5000
}
}
}
}

 

レスポンス

201 Created

 

XML
リクエスト

POST /api/v2/ssl/tunnel
Content-Type: application/xml

 

<ssl>
<tunnel>
<number>0</number>
<remote>
<remote-address>
<family>ip</family>
<address>smtp.example.com</address>
<port>465</port>
</remote-address>
</remote>
<listen>
<listen-address>
<family>ip</family>
<address>localhost</address>
<port>5000</port>
</listen-address>
</listen>
</tunnel>
</ssl>

 

レスポンス

201 Created

 

全SSLトンネル設定の取得

メソッド URI
GET /api/v2/ssl/tunnel
JSON
リクエスト

GET /api/v2/ssl/tunnel
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"tunnel": [
{
"number": 0,
"remote": {
"remote-address": {
"family": "ip",
"address": "smtp.example.com",
"port": 465
}
},
"listen": {
"listen-address": {
"family": "ip",
"address": "localhost",
"port": 5000
}
}
},
{
"number": 1,
・・・・・

 

XML
リクエスト

GET /api/v2/ssl/tunnel
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<ssl>
<tunnel>
<number>0</number>
<remote>
<remote-address>
<family>ip</family>
<address>smtp.example.com</address>
<port>465</port>
</remote-address>
</remote>
<listen>
<listen-address>
<family>ip</family>
<address>localhost</address>
<port>5000</port>
</listen-address>
</listen>
</tunnel>
<tunnel>
<number>1</number>
・・・・・

 

TEXT/PLAIN
リクエスト

GET /api/v2/ssl/tunnel
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

ssl tunnel 0
remote address ip smtp.example.com port 465
listen address ip localhost port 5000
ssl tunnel 1
・・・・・

 

SSLトンネル設定の更新

メソッド URI
PUT /api/v2/ssl/tunnel/{NUM}
JSON
リクエスト

PUT /api/v2/ssl/tunnel/0
Content-Type: application/json

 

{
"number": 0,
"remote": {
"remote-address": {
"family": "ip",
"address": "smtp.example.com",
"port": 465
}
},
"listen": {
"listen-address": {
"family": "ip",
"address": "localhost",
"port": 50000
}
}
}

 

レスポンス

204 No content

 

XML
リクエスト

PUT /api/v2/ssl/tunnel/0
Content-Type: application/xml

 

<tunnel>
<number>0</number>
<remote>
<remote-address>
<family>ip</family>
<address>smtp.example.com</address>
<port>465</port>
</remote-address>
</remote>
<listen>
<listen-address>
<family>ip</family>
<address>localhost</address>
<port>50000</port>
</listen-address>
</listen>
</tunnel>

 

レスポンス

204 No content

 

SSLトンネル設定の取得

メソッド URI
GET /api/v2/ssl/tunnel/{NUM}
JSON
リクエスト

GET /api/v2/ssl/tunnel/0
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"number": 0,
"remote": {
"remote-address": {
"family": "ip",
"address": "smtp.example.com",
"port": 465
}
},
"listen": {
"listen-address": {
"family": "ip",
"address": "localhost",
"port": 50000
}
}
}

 

XML
リクエスト

GET /api/v2/ssl/tunnel/0
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<tunnel>
<number>0</number>
<remote>
<remote-address>
<family>ip</family>
<address>smtp.example.com</address>
<port>465</port>
</remote-address>
</remote>
<listen>
<listen-address>
<family>ip</family>
<address>localhost</address>
<port>50000</port>
</listen-address>
</listen>
</tunnel>

 

TEXT/PLAIN
リクエスト

GET /api/v2/ssl/tunnel/0
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

ssl tunnel 0
remote address ip smtp.example.com port 465
listen address ip localhost port 50000

 

SSLトンネル設定の削除

メソッド URI
DELETE /api/v2/ssl/tunnel/{NUM}
リクエスト

DELETE /api/v2/ssl/tunnel/0

 

レスポンス

204 No content

 

パラメータ

指定可能なパラメータは下記の通りです。

なお指定可能なパラメータは、製品およびファームウェアのバージョンにより異なりますので、各パラメータの詳細については、各製品のユーザーズガイド(CLI版)も合わせてご参照ください。

  • パラメータ表の説明文中の記号について
    < > … 括弧内の値の範囲から選択することを示しています。
    [ ] … 括弧内の値のどれかを選択することを示しています。
  • パラメータ表の説明文中のデータタイプについて
    A.B.C.D … IPv4アドレス
    FQDN … FQDN名

 

パラメータおよびレベル 説明
Lv.1 Lv.2 Lv.3 Lv.4 Lv.5
ssl tunnel number SSLトンネル設定番号
description SSLトンネルの説明
version SSL/TLSバージョン … [tlsv1 | tlsv11 | tlsv12]
protocol keyword プロトコル … smtp
remote remote-address family アドレスファミリ … ip
address SSLトンネル接続先アドレス … 

  • A.B.C.D
  • FQDN
port ポート番号 … <1-65535>
listen listen-address family アドレスファミリ … ip
address  SSL受信アドレス … localhost
port ポート番号 … <1-65535>