iT邦幫忙

0

Fortinet 40c CLI設定問題

edit "wan1"
set vdom "root"
set mode dhcp
set distance 5
set priority 0
set dhcp-relay-service disable
unset dhcp-relay-ip
set dhcp-relay-type regular
unset ip
set allowaccess ping fgfm
set fail-detect disable
set arpforward enable
set broadcast-forward disable
set bfd global
set l2forward disable
set icmp-redirect enable
set vlanforward enable
set stpforward disable
set ips-sniffer-mode disable
set ident-accept disable
set ipmac disable
set subst disable
set log disable
set fdp disable
set status up
set netbios-forward disable
set wins-ip 0.0.0.0
set type physical
set sample-rate 2000
set polling-interval 20
set sample-direction both
set explicit-web-proxy disable
set explicit-ftp-proxy disable
set tcp-mss 0
set inbandwidth 0
set outbandwidth 0
set spillover-threshold 0
set weight 0
set external disable
set description ''
set alias ''
set l2tp-client disable
set vrrp-virtual-mac disable
config ipv6
set autoconf disable
set ip6-address ::/0
unset ip6-allowaccess
set ip6-default-life 1800
set ip6-hop-limit 0
set ip6-link-mtu 0
set ip6-manage-flag disable
set ip6-max-interval 600
set ip6-min-interval 198
set ip6-other-flag disable
set ip6-reachable-time 0
set ip6-retrans-time 0
set ip6-send-adv disable
end

得知 unset ip

會變成這樣是因為我想switch mode 改 interface mode但一直碰到
entry used by table system.dhcp.server:id '1'
entry used by child table srcintf:name 'internal' of table firewall.policy:policyid '1'
因此查網路上教學(以下)
test80C # diagnose sys checkused system.interface.name internal
entry used by table system.dhcp.server:id '1'
entry used by child table srcintf:name 'internal' of table firewall.policy:policyid '1'

查到後就先把它刪除吧
test80C # config firewall policy

test80C (policy) # delete 1

test80C (policy) # end

test80C # config system dhcp server

test80C (server) # delete 1

test80C (server) # end

在重下指令就可以收工了 (做到這邊 下面指令 就無法使用 但我已經看到 可以改成 interface mode,就改了)

test80C (global) # set internal-switch-mode interface

test80C (global) # end
Changing switch mode will reboot the system!
Do you want to continue? (y/n)

test80C #

The system is going down NOW !!

Please stand by while rebooting the system.

目前連不上 fortinet 因為沒IP,有點卡關 請大大解說我該怎辦~。

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
mytiny
iT邦超人 1 級 ‧ 2020-05-28 13:09:23
最佳解答

樓主老大,可以看一下有哪個介面可以連呀
show system interface
沒有IP就找個介面設一個給它嘍!

當初想將switch變成獨立interface
就該考慮到介面會沒有IP
同時還要注意set allowaccess
只有ping也是連不進去的
不然還有用USB consol可以連
但需要下載FortiExplorer

看更多先前的回應...收起先前的回應...
allenall iT邦新手 5 級 ‧ 2020-05-28 13:53:43 檢舉

大哥您好,小弟新手IT所以目前狀況是拿fortinet做測試學習
這邊不好意思的請問 set allowaccess 這句是在指什麼
我這邊是刻意拿40c沒有60D有的方便介面
想說 這樣可以學會時候比較知道原理

載請問 FortiExplorer是以下這個嗎?

FortiExplorer
FortiExplorer 是一種簡單易用的 Fortinet 裝置管理應用程式,可幫助您快速提供、部署和監控 Security Fabric 的元件,包括您行動裝置上的 FortiGate 和 FortiWiFi 裝置

我目前是打算用 console線 插著做連結打指令 不知道我有了這個方式 還需要您說的 FortiExplorer 這東西嗎?

如果有必要 我是可以將設備重製 在做一次
但不知道如何做是 最正確的將switch mode 改 interface mode

以上問題 順序有點雜亂 請見諒 謝謝

set allowaccess 是在interface上設定允許的服務,如http,https,ssh等

switch mode和interface mode官網文件就有說明與設定
https://kb.fortinet.com/kb/documentLink.do?externalID=FD38938

mytiny iT邦超人 1 級 ‧ 2020-05-28 21:08:45 檢舉

set allowaccess 已由wlhfor1974回復了
FortiExplorer是一沒有IP就可以用圖形介面管理的工具程式
如果用consol當然也可以設定fortigate,但GUI是比較通用的管理方式

allenall iT邦新手 5 級 ‧ 2020-05-29 09:16:24 檢舉

感謝兩位,這邊我先自行查詢,隨後有問題再請教兩位
非常謝謝

allenall iT邦新手 5 級 ‧ 2020-05-29 11:12:56 檢舉

switch mode和interface mode
目前卡關地方在:我轉成interface mode後
我其實不知道 如何去幫wan1 & port1 手動設定IP

原本以為這樣就可以新增

FGT40C # config system interface

FGT40C (interface) # edit "wan1"

FGT40C (wan1) # set ip 192.168.x.x/24
FGT40 # set wan1-ip 192.168.0.102
Unknown action 0

FGT40C # set wan1-ip 192.168.0.102/24
Unknown action 0

FGT40C # config system interface

FGT40C (interface) # config wan1
Unknown action 0

FGT40 (interface) # config wan1-ip
Unknown action 0

FGT40C (interface) # edit "wan1"

FGT40C (wan1) # set ip 192.168.0.102/24

Can't change dynamic IP
Command fail. Return code -651

但貌似不能,目前是用console 打指令,能否再請大哥們給個方向讓小弟知道,我目前該怎做~
非常感謝

mytiny iT邦超人 1 級 ‧ 2020-05-29 11:45:33 檢舉

有沒有試試打 set ip 192.168.0.102 255.255.255.0
然後記得設 set allowaccess https ssh ping
最後打end 存入

allenall iT邦新手 5 級 ‧ 2020-05-29 14:00:04 檢舉

第一個您說的對
value parse error before '192.168.0.102/255.255.255.0'
Command fail. Return code -9

還是我不應該這麼做?
因為我目前的想法是想,將wan1給一個IP 讓我可以連到web介面
再將lan1 連到我電腦 好做設定
這是我目前想法/images/emoticon/emoticon06.gif

allenall iT邦新手 5 級 ‧ 2020-05-29 15:09:10 檢舉

我看dhcp 應該會自動抓取才對
(interface) # show
config system interface
edit "wan1"
set vdom "root"
set mode dhcp
set allowaccess ping ssh http
set type physical
set defaultgw enable
next
edit "wan2"
set vdom "root"
set allowaccess ping fgfm
set type physical
next
edit "modem"
set vdom "root"
set mode pppoe
set type physical
next
edit "ssl.root"
set vdom "root"
set type tunnel
next
edit "internal1"
set vdom "root"

mytiny iT邦超人 1 級 ‧ 2020-05-29 17:00:16 檢舉

這樣吧!在下建議如下
若還不熟悉fortigate的Web操作,不如上網先多K點基本設定
資料很好找,等基本的會了再說
不然找人先帶入門一下
避免很多基本觀念都沒有

allenall iT邦新手 5 級 ‧ 2020-05-29 17:00:26 檢舉

謝謝我解決了 非常感謝 目前進到web介面

FGT40C # config system interface

FGT40C (interface) # edit "wan1"
-->設IP,allow service都是要進interface,以上題為例,就是要edit "interface name",也就是wan1

FGT40C (wan1) # set ip 192.168.x.x/24-->前面有出現wan1,才能設IP
FGT40 # set wan1-ip 192.168.0.102-->你己經退出WAN1,所以沒這指令

forti是可以用/24,/16設定IP的,如上面大大所說,google一下很多資料,有基本觀念,指令很好找

另外fotigate有提供虛擬硬碟檔試用15天,用vmware裝起來,拿來學習測試還不錯,去官網註冊就能下載

allenall iT邦新手 5 級 ‧ 2020-06-02 09:23:53 檢舉

理解~ 感謝你

我要發表回答

立即登入回答