Skip to content

FortiGate でコンフィグを表示するには「show」

Cisco IOS などではコンフィグを表示したい場合、show running-config などを利用します。 しかし、FortiGate では show コマンドを利用します。 このメモでは FortiGate でコンフィグを表示する方法を整理してメモしておきます。

検証環境

対象 バージョン
FortiOS 7.2.4

FortiGate のコマンド体系

幾つかの例で Cisco と FortiGate のコマンドを比較すると、例えば以下のようになります。 Cisco の場合は「情報の表示」「設定の表示」いずれも show 〜 コマンドを利用します。 しかし、FortiGate の場合は「情報の取得は get」「設定の取得は show」コマンドを利用します。

Cisco FortiGate
インターフェイス設定を開始する configure terminalinterface Gi0/1 config system interfaceedit "port1"
インターフェイス情報を表示する show interfaces get system interface
インターフェイス設定を表示する show running-config interface Gi0/1 show system interface port1

「more 表示をしない・表示する」を切り替える

FortiGate のコンフィグを全て表示すると非常に長くなります。 通常であれば 1 画面ごとに more が表示され、停止します。 この more を「表示する」「表示しない」は以下のコンフィグで切り替えます。 Cisco IOS の場合は「terminal length 0 コマンドでセッションごとに設定する」ことになりますが、FortiGate の場合はセッションごとの切り替えは出来ません。 Cisco ASA の no pager のようにセッション単位では無く、コンフィグで切り替えます。

more を表示しない

config system console
    set output standard
end

more を表示する

config system console
    set output more
end

コンフィグを全部 / 部分的に表示する

コンフィグを表示する場合、「デフォルト値を含めずに表示する」場合は show コマンドを、「デフォルト値を含めて表示する」場合は show full-configuration を利用します。 「全設定を表示したいか?」「部分的な設定を表示したいか?」も含め、コマンド例を整理すると例えば以下のようになります。

全設定をデフォルト値込みで表示するとかなり出力量が多くなる為、事前に more の表示を停止しておいた方が便利です。

No. 対象 デフォルト値表示 コマンド
1 全設定 表示しない show
2 全設定 表示する show full-configuration
3 インターフェイス 表示しない show system interface
4 インターフェイス 表示する show full-configuration system interface
5 静的ルート 表示しない show router static
6 静的ルート 表示する show full-configuration router static

show コマンドに続けて ? を入力すると、以下の候補が表示されます。

# show [?]
alertemail              Alert email configuration.
antivirus               AntiVirus configuration.
application             Application control configuration.
authentication          authentication
automation              Automation configuration.
dlp                     DLP configuration.
dnsfilter               DNS filter configuration.
dpdk                    FortiOS DPDK Helper configuration.
emailfilter             AntiSpam configuration.
endpoint-control        Endpoint control configuration.
extension-controller    FortiGate controller configuration.
file-filter             file-filter
firewall                Firewall configuration.
ftp-proxy               FTP proxy configuration.
icap                    ICAP client configuration.
ips                     IPS configuration.
log                     Log configuration.
report                  Report configuration.
router                  Router configuration.
sctp-filter             SCTP filter configuration.
ssh-filter              SSH filter configuration.
switch-controller       External FortiSwitch configuration.
system                  System operation configuration.
user                    Authentication configuration.
videofilter             videofilter
voip                    VoIP configuration.
vpn                     VPN configuration.
waf                     Web Application Firewall configuration.
wanopt                  WAN optimization configuration.
web-proxy               Web proxy configuration.
webfilter               Web filter configuration.
wireless-controller     Wireless access point configuration.
full-configuration      show full configuration