首页 > 解决方案 > 如何在 Fortigate CLI 中的接口上设置 IP 地址?

问题描述

我想在 Fortinet Fortigate CLI 的 Port1 上设置 IP 地址。

我正在尝试使用以下命令:

set ip 192.168.176.0 255.255.255.0

但我在 255.255.255.0 之前收到以下错误:

IP地址非法值解析错误

我已经尝试了很多,但未能理解这个问题背后的原因。

标签: firewallweb-application-firewallfortigate

解决方案


默认情况下,Fortigate 的所有接口都处于 DHCP 模式。因此,您需要将其设为静态并允许访问您想在那里使用的协议。

这里要注意的另一件事是,如果您尝试将 192.168.176.0/24 分配给接口,那么这是一个无效的 IP,因为它是一个网络地址。

试试,下面的命令,

system config interface
  edit port1
    set mode static
    set allowaccess ping http https ssh telnet
    set ip 192.168.176.1/24
    end

推荐阅读