fortigate 確認コマンド・基本操作①

ログイン

デフォルトのIDは、admin Passwordは、無し。

exitで、またログインモードに戻ります。

 

FGT40C3912023132 login: admin
Password:
Welcome !

FGT40C3912023132 #

FGT40C3912023132 # exit

FGT40C3912023132 login:

 

シャットダウン

The system is halted.と表示されたら、電源OFFが良いらしいです。

ちなみにhalted出た後は、実機のPowerランプは光ってますが、IFのランプは消えてました。

halt=停止

 

FGT40C3912023132 # execute shutdown
This operation will shutdown the system !
Do you want to continue? (y/n)y


System is shutting down...

System is shutting down...


The system is going down NOW !!

System is shutting down...

FGT40C3912023132 #
The system is halted.

 

 

機器情報の確認

機種・OSのバージョン、シリアル番号などが確認できます。

(それ以外は、まだよく分からないので追々覚えます。。)

Ciscoのshow versionと同じような結果が表示されます。

 

FGT40C3912023132 # get system status

Version: FortiGate-40C v5.2.15,build0766,191022 (GA)
Virus-DB: 16.00560(2012-10-19 08:31)
Extended DB: 1.00000(2012-10-17 15:46)
IPS-DB: 5.00555(2014-10-07 01:21)
IPS-ETDB: 0.00000(2001-01-01 00:00)
Serial-Number: FGT40C3912023132
Botnet DB: 1.00000(2012-05-28 22:51)
BIOS version: 04000006
System Part-Number: P08924-05
Log hard disk: Not available
Internal Switch mode: switch
Hostname: FGT40C3912023132
Operation Mode: NAT
FIPS-CC mode: disable
Current HA mode: standalone
Branch point: 766
Release Version Information: GA
System time: Sat Mar  5 23:20:37 2022

 

コンフィグの確認

Ciscoのshow running-configと同じ内容ですが

とんでもないコンフィグ量が表示されるので、確認したところだけ表示させたほうが良いと思いました。。

 

FGT40C3912023132 # show

 

分割表示(intefaceの設定確認の場合)

 

FGT40C3912023132 # show system interface
config system interface
    edit "wan1"
        set mode dhcp
        set allowaccess ping fgfm auto-ipsec
        set type physical
        set snmp-index 1
    next
    edit "wan2"
        set allowaccess ping fgfm auto-ipsec
        set type physical
        set snmp-index 2
    next
    edit "modem"
        set mode pppoe
        set type physical
        set snmp-index 3
    next
    edit "ssl.root"
        set type tunnel
        set alias "SSL VPN interface"
        set snmp-index 6
    next
    edit "internal"
        set ip 192.168.1.99 255.255.255.0
        set allowaccess ping https ssh http fgfm capwap
        set type physical
        set snmp-index 7
    next
end

 

特定のインターフェースのみ表示

Fortigate # show system interface wan1
config system interface
    edit "wan1"
        set ip 192.168.2.2 255.255.255.0
        set allowaccess telnet
        set type physical
        set snmp-index 1
    next
end

Fortigate #

 

インターフェースの状態確認

Ciscoのshow ip interface briefみたいな感じですね。

 

FGT40C3912023132 # get system interface physical
== [onboard]
        ==[internal]
                mode: static
                ip: 192.168.1.99 255.255.255.0
                ipv6: ::/0
                status: up
                speed: 1000Mbps (Duplex: full)
        ==[wan1]
                mode: dhcp
                ip: 0.0.0.0 0.0.0.0
                ipv6: ::/0
                status: down
                speed: n/a
        ==[wan2]
                mode: static
                ip: 0.0.0.0 0.0.0.0
                ipv6: ::/0
                status: down
                speed: n/a
        ==[modem]
                mode: pppoe
                ip: 0.0.0.0 0.0.0.0
                ipv6: ::/0
                status: down
                speed: n/a

FGT40C3912023132 #

 

ルーティングテーブルの確認

Ciscoのshow ip routeと同じですね。

ルーティングプロトコルを指定して表示も可能です。

 

FGT40C3912023132 # get router info routing-table
Command fail. Return code -9999

FGT40C3912023132 # get router info routing-table
details      show routing table details information
all          show all routing table entries
rip          show rip routing table
ospf         show ospf routing table
bgp          show bgp routing table
isis         show isis routing table
static       show static routing table
connected    show connected routing table
database     show routing information base

 

 

FGT40C3912023132 # get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default

C       192.168.1.0/24 is directly connected, internal


FGT40C3912023132 #

 

ホスト名の変更

endまで入力しないと、変わりません。

 

Fortigate # config system global

FGT40C3912023132 (global) # set hostname
<string>    please input string value

FGT40C3912023132 (global) # set hostname Fortigate

FGT40C3912023132 (global) # end

Fortigate #

 

設定の保存について

Ciscoでは、コンフィグの保存をrunconfigとstartup-configの2つに分かれており

機器が起動すると、startup-configの設定をrunconfigに読み込んで、起動します。

設定変更を行った場合は、runconfigに書き込まれ、電源OFFする前にstartup-configに保存しないと、次回起動時に変更前のconfigを読み込んで起動するため、設定変更が無かったことにされます。

fortigateは、上記のような仕組みがないのか、設定変更後にendすると

勝手に保存されるみたいです。

fortigateで設定変更後に、下記保存コマンド投入しても

保存失敗します。

Fortigate # execute cfg save
no config to be saved.

 

ちなみに、endではなくexit投入すると、下記エラー表示

 

Fortigate (global) # exit
please use 'end' to return to root shell

 

more表示・非表示

Ciscoの terminal length 0 (ter len 0)と同じ

【表示】

Fortigate # config system console

Fortigate (console) # set output more

 

【非表示】

Fortigate # config system console

Fortigate (console) # set output standard

 

【more表示状態】

Fortigate # get system interface physical
== [onboard]
        ==[internal]
                mode: static
                ip: 192.168.1.99 255.255.255.0
                ipv6: ::/0
                status: up
                speed: 1000Mbps (Duplex: full)
        ==[wan1]
                mode: static
                ip: 192.168.2.2 255.255.255.0
                ipv6: ::/0
                status: up
                speed: 100Mbps (Duplex: full)
        ==[wan2]
                mode: static
                ip: 0.0.0.0 0.0.0.0
                ipv6: ::/0
                status: down
                speed: n/a
        ==[modem]
                mode: pppoe
                ip: 0.0.0.0 0.0.0.0
                ipv6: ::/0
                status: down
--More--

 

【more非表示状態】

Fortigate # get system interface physical
== [onboard]
        ==[internal]
                mode: static
                ip: 192.168.1.99 255.255.255.0
                ipv6: ::/0
                status: up
                speed: 1000Mbps (Duplex: full)
        ==[wan1]
                mode: static
                ip: 192.168.2.2 255.255.255.0
                ipv6: ::/0
                status: up
                speed: 100Mbps (Duplex: full)
        ==[wan2]
                mode: static
                ip: 0.0.0.0 0.0.0.0
                ipv6: ::/0
                status: down
                speed: n/a
        ==[modem]
                mode: pppoe
                ip: 0.0.0.0 0.0.0.0
                ipv6: ::/0
                status: down
                speed: n/a

Fortigate #