【发布时间】:2020-03-23 23:44:12
【问题描述】:
我想在 Fortinet Fortigate CLI 的 Port1 上设置 IP 地址。
我正在尝试使用以下命令:
set ip 192.168.176.0 255.255.255.0
但我在 255.255.255.0 之前收到以下错误:
IP地址非法值解析错误
我尝试了很多,但无法理解这个问题背后的原因。
【问题讨论】:
标签: firewall web-application-firewall fortigate
我想在 Fortinet Fortigate CLI 的 Port1 上设置 IP 地址。
我正在尝试使用以下命令:
set ip 192.168.176.0 255.255.255.0
但我在 255.255.255.0 之前收到以下错误:
IP地址非法值解析错误
我尝试了很多,但无法理解这个问题背后的原因。
【问题讨论】:
标签: firewall web-application-firewall fortigate
配置port1 IP地址和网络掩码。
例如:
config system interface
edit port1
set ip 192.168.0.100 255.255.255.0
end
【讨论】:
默认情况下,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
【讨论】:
您想将“192.168.176.0/24”配置为 FortiGate 接口 IP 地址:
您不能将网络 ip 地址配置为接口 ip。而是使用可用的 ip。
system config interface
edit port1
set mode static
set allowaccess ping https ssh
set ip 192.168.176.1/24
next
end
【讨论】: