labunix's blog

labunixのラボUnix

FortiCloud(Fortisandbox)を試してみる。

■FortiCloud(Fortisandbox)を試してみる。
 1GBまでは無料の集中管理、ログ管理ツール。
 FortiSandbox Cloudを利用することが出来る。

 FortiCloudクラウド型セキュリティとログ管理サービス
 http://www.fortinet.co.jp/products/fams/

# get system fortiguard-log-service status | grep -v Expire
FortiCloud
Total disk quota: 1024 MB
Max daily volume: 102 MB
Content archive option: yes
Current disk quota usage: 0 MB

■FortiCloudとの接続確認。
 注意点は設定済みのデバイスに「Setup Wizard」を使用しないこと。
 firewallポリシーやルーティング設定が消えます。
 というか、消しましたw。。。

# diagnose fdsm account-info 
Account information: status=200, type=basic.

■GUIで[設定]->[FortiSandbox]->
 [Sandboxインスペクションを有効]にして
 [FortiSandbox Cloud]を選択しても
 Sandboxアプライアンスでは無いので設定が変わらないようだ。

# show full-configuration system fortisandbox
config system fortisandbox
    set status disable
    set email ''
end

■GUIで[セキュリティプロファイル]->[アンチウイルス]->
 [Send Files to FortiSandbox Cloud for Inspection]では
 [疑わしいファイルのみ]とした。

# show | grep -f ftgd-a
config antivirus profile
    edit "default"
        set comment "Scan files and block viruses."
        set inspection-mode proxy
        set ftgd-analytics suspicious <---
    next
end

■Fortigurdにログを送信する設定をしていると、Cloudから確認出来る。

# show log fortiguard setting 
config log fortiguard setting
    set status enable
end

■送信はリアルタイムで行われる。

# get log fortiguard setting 
status              : enable 
upload-option       : realtime 
enc-algorithm       : default 
source-ip           : 0.0.0.0

■送信するログの内容は以下の条件にマッチしたもの。

# get log fortiguard filter 
severity            : information 
forward-traffic     : enable 
local-traffic       : enable 
multicast-traffic   : enable 
sniffer-traffic     : enable 
anomaly             : enable 
netscan-discovery   : enable 
netscan-vulnerability: enable 
voip                : enable 
dlp-archive         : enable 

■送信したログはデバイスのWeb管理画面から確認出来る。

# show log gui-display 
config log gui-display
    set location fortiguard
end

■ところで。
 GUIで手動でコンフィグのリビジョンを作成出来る。
 他に、ログアウトの際に自動でリビジョンを作成する設定もある。

# show system global | grep revision
    set revision-backup-on-logout enable
# exit
Auto backup config ...

■デバイスからFTP転送したり、SCP+CRONで外部からでもバックアップ出来る。

 FortiGate-80Cの初期設定、バックアップ、リストア
 http://labunix.hateblo.jp/entry/20141221/1419153677

 Fortigate-80Cのバックアップをscpとcronで自動化する。
 http://labunix.hateblo.jp/entry/20150301/14251375772台のデバイスが対象なので、以下のようにスクリプトを変更。

$ ./fortigate_backup.sh 
sys_config                                  100%   91KB  15.2KB/s   00:06    
sys_config                                  100%  109KB  21.7KB/s   00:05    

$ cat fortigate_backup.sh 
#!/bin/bash

MYDATE=`date '+%Y%m%d_%H%M%S'`

echo "172.31.31.249
      172.31.31.252" | \
 awk '{print "scp "$1":sys_config "$1"_sys_config_"}' | \
 sed -e 's/_sys_config_/&'${MYDATE}'/' | sh

$ ls *sys_config_*
172.31.31.249_sys_config_20150906_043732  172.31.31.252_sys_config_20150906_043732