FortiGateの基本設定例2¶
[更新: 2023年7月20日]
1. 概要¶
弊社による検証データの一部を公開した記事掲載となります。参考までにご利用ください。
注釈
お客様個別の要件定義、設計、開発・設定補助に関するサポートは、FortiGateVMのライセンスサービスに含まれません。
1.1 検証条件¶
- 本掲載による参考例は、vrrpを予定するためルータ+スイッチを利用します。
- お客様の操作を意図するため、設定例掲載前の検証環境は実際のさくらのクラウド環境により検証がされます。
- FortiGateは、GUIとCLIのサポートとなります。掲載はCLI、GUIを適宜使い分け掲載いたします。
- 本掲載により利用された検証環境のFortiOSは、両系ともに7.0.12です。
- コマンドの一部は、<>記載により抽象化、強調記載をします。実際に入力を行う際は<>を削除、実際に入力する値に置き換えください。
2 システム設定に関する基本設定¶
本項目は、FortiGateシステム設定の一部を解説します。
注釈
本設定の一部はメーカー、ベンダードキュメントにも記載があります。 System 参照ください。
注釈
メーカードキュメント 各バージョンの ベストプラクティス も合わせて確認ください。
2.1 ホスト設定¶
ホスト名を未設定の際は、ライセンスのシリアルNo(インポートファイル名)が表示されます。
変更する際は、下記のメニュー順に操作、hostnameの項目より設定します。
System
>>> Setting
>>> System Settings
>>> Host name
Host Name画面
参考画面は、Fortisacloud_masterへ変更します。Host nameを入力後、Applyを入力します。
変更後の表示
注釈
host nameは、設定に下記の制限があります。
The host name may be up to 35 characters in length. It may include US-ASCII letters, numbers, hyphens, and underscores. Spaces and special characters are not allowed.
2.2 システム時間帯¶
機器の設定時間をJP Timeへ変更します。ログ、2FA(FortiToken)などの重要な設定になるため、時刻を変更します。
変更の際は下記のメニュー順に操作、設定画面を表示します。
System
>>> Setting
>>> System Settings
>>> System Time
システム時間画面
GMT +9:00に変更します。Apply後にcurrent system timeは設定したtimezone表示に変更されます。
2.3 管理アクセス設定¶
GUIによる管理画面アクセスを設定する項目です。変更の際は下記のメニュー順に操作、設定画面を表示します。
System
>>> Setting
>>> System Settings
>>> Administration Settings
Administration Settings画面
参考画面は、Idle timeoutにより待機 >>> 切断時間を標準設定の5分から30分に変更します。
注釈
FortiOSによりインターフェースに許可された通信が異なる可能性があります。CLIの接続はできるが、GUI接続できないなどの際は set allowaccess
項目を確認ください。
3. CLI コマンド操作方法の補足¶
本項目は、機器のCLI操作に関する簡単な基本設定を説明、補足します。
注釈
OSバージョンに応じて記載内容、詳細が異なるケースがございます。詳細は FortiOS CLI reference を参照ください。
3.1 コマンドリスト表示¶
?
を入力することでコマンドリストを表示します。
?入力画面
ortisacloud_master # <?>
config Configure object.
get Get dynamic and system information.
show Show configuration.
diagnose Diagnose facility.
execute Execute static commands.
alias Execute alias commands.
exit Exit the CLI.
コマンドを途中まで入力 ?
実行をすると。後続に入力が有効なコマンドリストが表示されます。
show コマンド以降のリストを呼び出し
Fortisacloud_master # show <?>
alertemail Alert email configuration.
antivirus AntiVirus configuration.
application Application control configuration.
authentication authentication
dlp DLP configuration.
dnsfilter DNS filter configuration.
dpdk FortiOS DPDK Helper configuration.
emailfilter AntiSpam configuration.
endpoint-control Endpoint control configuration.
extender-controller FortiExtender controller configuration.
file-filter file-filter
firewall Firewall configuration.
ftp-proxy FTP proxy configuration.
icap ICAP client configuration.
ips IPS configuration.
log Log 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 configurationv
3.2 コマンドの入力補助¶
コマンドの途中でTABキーを入力により以降で有効なコマンドが入力されます。
再度TABキーを入力することで次に有効なコマンドが入力されます(A~順に入力されます)。
参考例
Fortisacloud_master # show full-<TABキー>
>>> Fortisacloud_master # show full-configuration
3.3 コマンド検索¶
一部他サービスや機器と共通のコマンドの実行が可能です。
参考例 検索例
Fortisacloud_master # show full-configuration | grep router
edit "all_routers"
set router enable
config router access-list
config router access-list6
config router aspath-list
config router prefix-list
config router prefix-list6
config router key-chain
config router community-list
config router route-map
config router rip
config router ripng
config router static
config router policy
config router policy6
config router static6
参考例 ping
FGVM1VTM20001321_SB # execute ping 0.0.0.0
PING 0.0.0.0 (0.0.0.0): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0.0 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=255 time=0.0 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=255 time=0.0 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=255 time=0.0 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=255 time=0.1 ms
--- 0.0.0.0 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.0/0.0/0.1 ms
3.4 CLIコマンドについて補足¶
一部設定は、初期状態の標準設定値では表示されない設定項目、CLIにのみ設定可能な項目があります。
上記を確認する際は show full-configuration
show full
コマンドを入力します。
4. その他の補足¶
その他の基本的な設定に関する簡単な基本設定を説明、補足します。
4.1 能表示¶
初期状態のFortiGateは、OSの設定により機能表示が非表示となる設定があります。
変更の際は下記のメニュー順に操作、設定画面を表示します。
システム
>>> 表示機能設定
表示機能設定画面
注釈
その他の設定値などにより変更後も非表示となる項目があります。
4.2 FortiOS 7以降のログレポートについて¶
7系以降からForti OSのログレポートは、FortiCloudによる収集レポート強化がされた背景から利用にはFortiGate Cloudとの連携が必要となります。
FortiGate Cloudを利用する際は、CLIによる操作、FortiGate Cloudアカウントの登録が必要となります。
注釈
無償、有償と利用される内容によりサポートなど提供内容が異なります。
4.3 FortiTokenの利用¶
ライセンスに無償のFortiTokenが2ライセンス付帯されます。
2ライセンス以上を利用する際は、別途ライセンスの購入と利用するFortigateへの登録が必要です。
FortiToken画面