預設的情況下VMware
會把主戰機的網卡IP 設為 .1
如果
把VMnet1設定成使用NAT模式
VMware就會自動把VMnet1的Gateway設為 .2
這個.2的VMware Gateway
是VMware預設
真的有功能的
但...
這不是我要的
企業內,不會這樣設定
按慣例設 .254

這樣...
就能從VMware
所掌控的gateway給搶過來
自己去定義
掌握了Gateway就掌握了封包的去向
那麼...
誰要來當這個Gateway的腳色?
我試了很多
最後...
實用性+便利性+普遍性 考量下
選用Fortigate VM64來充當這個腳色
一、安裝 Fortigate VM64
二、設定 Fortigate (Mgt IP, Log disk, Time Out)
三、驗證
一、安裝 Fortigate VM64
01-01.下載
這個需要到網路上去搜尋
還真不好找
不過,至少並非找不到,只要有心...
前10頁一定有!

解壓縮後
你應該會看到這些檔案
按名稱的不同,其實對應的資源需求也不同
這邊
我們就用FortiGate-VM64.ovf來導入VMware環境
執行 FortiGate-VM64.ovf

01-02 佈署VM
指定個路徑和名稱吧~
按下Import

01-02 授權資訊
一定要同意的啊~

開始佈署VM
很快就會佈好了,你看看~多方便啊

01-02 檢視VM資訊
看,洋洋灑灑的
直接就給你佈好10個vNIC
只是每個都是Bridged Mode
但是,這也不是我要的
等會...我們再來改...

二、設定 Fortigate
到這邊有需要做幾個設定:
1. 設定 Fortigate 的管理IP (不然要怎麼管理? CLI?)
2. 設定 Frotigate 的Log Disk (方便需要時可以參考)
3. 設定 Session time out (不過就是個Lab)
02-01 設定 Fortigate 的管理IP
把這個VM開機後,會進入到CLI畫面

預設ID: admin
預設PW: 無

照規劃,Gateway設192.168.10.254 請依序輸入以下指令
config system interface
edit port1
set ip 192.168.10.254 255.255.255.0
set allowaccess ssh ping http https
end
注意:
Fortigate 在設定完成後,必須要輸入end
這樣設定才會被套用

02-02 變更 VMware vNIC 對應的 VMnet
管理IP設定好後
照目前的設定上來看,若由主戰機去ping 192.168.10.254
應該不會通,如果會通的話....>>快去拜拜
因為這個VM的vNIC,並沒有
對應到VMware Workstation的VMnet1
所以需要設定
還記得嗎?我們規劃中VMnet1走的是192.168.10網段
要能互通,至少要在同一個VMnet上才行
修改一下設定吧~
請參考下圖

02-03 用Browser去開portal
網路VM的vNIC 和 VMware Workstation的 VMnet設好後
用瀏覽器開啟 http://192.168.10.254
登入資訊忘了?
ID:admin
PW:無

登入後的第一個畫面
就是 License資訊
其實...
這個Fortigate VM是要錢的
否則只能試用15天
也就是說15天之後,就要再重新安裝一次

不過,你看看安裝過程這麼容易
實在罕見~
更厲害的是
Fortigate VM有個功能,就是可以備份設定檔
有可以備份,當然就會有可以還原囉

聰明的你,應該知道怎麼用了吼~
但也不用太聰明,直接佈給他超大的資源(4core8GB之類的)
因為,Fortigate雖然佛心
畢竟不是來做慈善事業的
所以...不支援
且你會用讓你的CPU飆高,來提醒你~

02-04 設定 Fortigate 的Log Disk
剛登入,你就會發現 Alert Message Console的地方
有個訊息
Log disk is unavailable

主要是說
目前儲存Log的disk無法使用
為何無法使用?
因為還沒格式化啊~
還記得嗎~這個Fortigate的VM佈署好了之後
一出生,就給了2個disk,其中1個就是放Log的
不信的話
請到Log & Report > Event Log > System 看看
沒有任何Log
好了~
開始設定
請回到CLI畫面
輸入以下指令查看目前disk status
get system ststus已經很清楚的告訴你了
需要格式化 need format

輸入以下指令
進行格式化
execute formatlogdisk

格式化完成後,就reboot
按y

開始格式化...
等待一下,他會自動重啟

重開機完成後
再回到Log & Report > Eevet Log > System
查看看,有沒有Log了
為何要特別說明
需要設定看的到Log
因為這個很重要
有些事情,需要反向去看,才能看到原因
透過Log或許能看到一些端倪

02-05 設定 Session time out
剛剛的操作中
是不是常常頁面稍有停留一段時間
帳號就被登出了
這是安全機制的關係
畢竟這是Firewall
不過...
我們是在做Lab,便宜行事就好
把time out 時間加長吧~
System > Admin > Settings > Idle Timeout
設成480,再按下Apply

三、驗證
03-01 驗證是否正常
先定義一下何為正常
隨著Lab越做越大
腦袋對於Lab的架構也一定要清楚
從主戰機(即實體機)
去ping 192.168.10.254要能通

且須確認回的MAC是否正確

驗證
去核對看看,這組MAC
是不是Fortigate VM的第1張vNIC的MAC
相符的話,大致上
這個章節的設定就完成囉

如果連ping都不通的話
請檢查一下主戰機的路由
開啟cmd,輸入 route print
至少要有 黃色框起來的部分

意思是說:
封包中目的地IP為: 192.168.10.0~192.168.10.255的
往本機 IP為 192.168.10.1 的 interface 送過去

那我...
怎麼會知道哪個initerface的IP是192.168.10.1呢?
照我自己所規劃的Lab環境
就是 VMware Virtual Ethernet Adapter for VMnet1


確認一下
1.主戰機有沒有192.168.10.1的interface
2.主戰機防火牆有沒有關掉
3.主戰機的路由是否正確
4.主戰機的VMware Virtual Ethernet Adapter for VMnet1網卡,IP有沒有打錯
5.VMware Workstation的VMnet1有沒有對應到Fortigate VM的vNIC1
6.VMware Workstation的VMnet1是否有設定在NAT模式
到這邊,我們完成了
1.建置 Fortigate VM64 的基本管理IP設定
2.由主戰機可以ping的到 Fortigate VM64的管理IP
網誌管理員已經移除這則留言。
回覆刪除