はじめに
このドキュメントでは、Secure Web Appliance(SWA)でインターネット接続をテストする手順について説明します。
前提条件
要 件
次の項目に関する知識が推奨されます。
- SWAのコマンドラインインターフェイス(CLI)にアクセスします。
使用するコンポーネント
このドキュメントの内容は、特定のソフトウェアやハードウェアのバージョンに限定されるものではありません。
このドキュメントの情報は、特定のラボ環境にあるデバイスに基づいて作成されたものです。このドキュメントで使用するすべてのデバイスは、クリアな(デフォルト)設定で作業を開始しています。本稼働中のネットワークでは、各コマンドによって起こる可能性がある影響を十分確認してください。
CURL
ステップ 1: SWAのCLIにログインします。
ステップ 2curlと入力してEnterキーを押します。
ステップ 3DIRECTを選択し、トラフィックにプロキシポリシーが適用されていない状態でSWAインターネットアクセスをテストします。
ステップ 4Do you wish to choose specific interface of appliance?の解答として「y」と入力し、Enterキーを押します。
ステップ 5 インターネットにアクセスできるインターフェイスに関連付けられている番号を入力します。
ステップ 6テスト用のURLを入力して、Enterキーを押します。
注:URLがHTTP://またはHTTPS://で始まることを確認してください。
SWA_CLI> curl
Choose the operation you want to perform:
- DIRECT - URL access going direct
- APPLIANCE - URL access through the Appliance
[]> DIRECT
Do you wish to choose particular interface of appliance?
[N]> y
1. Management
2. P1
3. P2
Enter the interface number:
[1]> 3
Enter URL to make request to
[]> http://www.cisco.com
検証
HTTP応答コードを確認できます。この例では、HTTP応答コードは200で、接続が確立されたことを意味します。
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 015:34:55.026472 * Trying 10.18.27.120:80...
15:34:55.026645 * Local Interface nic0 is ip 10.1.1.1 using address family 2
15:34:55.026676 * Local port: 0
15:34:55.035164 * Connected to www.cisco.com (10.18.27.120) port 80 (#0)
15:34:55.035202 > HEAD / HTTP/1.1
15:34:55.035202 > Host: www.cisco.com
15:34:55.035202 > User-Agent: curl/7.74.0
15:34:55.035202 > Accept: */*
15:34:55.035202 >
15:34:55.056382 * Mark bundle as not supporting multiuse
15:34:55.056397 < HTTP/1.1 200 OK
15:34:55.056429 < Date: Thu, 19 Mar 2026 19:34:54 GMT
15:34:55.056451 < Content-Type: text/html
15:34:55.056474 < Connection: keep-alive
15:34:55.056490 < CF-RAY: 9deeead18c0b253f-ORD
15:34:55.056515 < Last-Modified: Wed, 18 Mar 2026 19:14:43 GMT
15:34:55.056538 < Allow: GET, HEAD
15:34:55.056562 < Accept-Ranges: bytes
15:34:55.056583 < Age: 2119
15:34:55.056606 < cf-cache-status: HIT
15:34:55.056619 < Server: cloudflare
15:34:55.056639 <
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
15:34:55.056723 * Connection #0 to host www.cisco.com left intact
この例では、SWAがURLにアクセスできなかったことがわかります。
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 015:38:29.520762 * Trying 10.18.27.120:443...
15:38:29.520927 * Trying 10.18.26.120:443...
15:38:29.521068 * Closing connection 0
curl: (7) Couldn't connect to server
SSLツール
ssltoolは、CLIバージョンのopenssl s_clientコマンドです。Secure Web Applianceプロキシポリシーを使用せずに、SSL/TLSを使用して直接リモートホストに接続する
ステップ 1: SWAのCLIにログインします。
ステップ 2ssltoolと入力してEnterキーを押す。
ステップ 3SCLIENTと入力してEnterを押す。
ステップ 4 COMMANDと入力してEnterキーを押します。
ヒント:HELPと入力してEnterキーを押すと、このコマンドの詳細が表示されます。
ステップ 5 opensslコマンドを入力し、Enterキーを押します。
SWA_CLI> ssltool
Choose the operation you want to perform:
- SCLIENT - This is CLI version of openssl s_client command. It will connect to a remote host using SSL/TLS directly without using Secure Web Appliance
- CLEARLOGS - Delete all logs generated by ssltool
[]> SCLIENT
Choose the operation you want to perform:
- COMMAND - Execute an openssl s_client command
- HELP - Help information about this command
[]> COMMAND
Enter an openssl command for example: 'openssl s_client -connect www.cisco.com:443' or hit enter to go back
[]>
Telnet
注:telnetコマンドは、SWAバージョン15.0以降では削除されています。
ステップ 1: SWAのCLIにログインします。
ステップ 2telnetと入力してEnterキーを押す。
ステップ 3インターネットにアクセスできるインターフェイスに関連付けられている番号を入力します。
ステップ 4リモート ホスト名または IP アドレスを入力します。
ステップ5:リモートホストのHTTPまたはHTTPSポートに対するTCP接続をテストするには、「リモートポートの入力」の解答に80または443を入力できます。
ステップ 6telnetを終了するには、Controlキーを押しながら、] を押します。
SWA_CLI> telnet
Please select which interface you want to telnet from.
1. Auto
2. Management (10.48.48.183/24: man-wsa125.amojarra.local)
3. P1 (10.10.10.10/24: p1-wsa125.amojarra.local)
4. P2 (10.20.20.20/24: p2-wsa125.amojarra.local)
[1]>4
Enter the remote hostname or IP address.
[]> cisco.com
Enter the remote port.
[23]> 8443
Trying 10.20.3.15...
Connected to 10.20.3.15.
Escape character is '^]'.
関連情報