Fortinet black logo

CLI Reference

interface

interface

Use this command to edit the configuration of a FortiManager network interface.

Syntax

config system interface

edit <port>

set status {up | down}

set ip <ipv4_mask>

set allowaccess {http https ping snmp ssh webservice}

set serviceaccess {fclupdates fgtupdates webfilter-antispam}

set update-service-ip <ip&netmask>

set rating-service-ip <ip&netmask>

set speed {1000full 100full 100half 10full 10half auto}

set description <string>

set alias <string>

set mtu <integer>

config ipv6

set ip6-address <ipv6 prefix>

set ip6-allowaccess {http https https-logging ping snmp ssh webservice}

set ip6-autoconf {enable | disable}

end

end

Variable

Description

<port>

The port can be set to a port number such as port1, port2, port3, or port4. Different FortiManager models have different numbers of ports.

status {up | down}

Start (up) or stop (down) the interface (default = up). If the interface is stopped it does not accept or send packets. If you stop a physical interface, VLAN interfaces associated with it also stop.

ip <ipv4_mask>

Enter the interface IPv4 address and netmask. The IPv4 address cannot be on the same subnet as any other interface.

allowaccess {http https ping snmp ssh webservice}

Enter the types of management access permitted on this interface. Separate multiple selected types with spaces.

If you want to add or remove an option from the list, retype the list as required.

serviceaccess {fclupdates fgtupdates webfilter-antispam}

Enter the types of service access permitted on this interface. Separate multiple selected types with spaces. If you want to add or remove an option from the list, retype the list as required.

  • fclupdates: FortiClient updates access.
  • fgtupdates: FortiGate updates access.
  • webfilter-antispam: Web filtering and antispam access.

update-service-ip <ip&netmask>

The IP address for the FortiGate update service. It must be on the same subnet as the interface IP address.

This variable is only available when serviceaccess is fgtupdates.

rating-service-ip <ip&netmask>

The IP address for the FortiGate rating service. It must be on the same subnet as the interface IP address.

This variable is only available when serviceaccess is webfilter-antispam.

speed {1000full 100full 100half 10full 10half auto}

Enter the speed and duplexing the network port uses:

  • 100full: 100M full-duplex
  • 100half: 100M half-duplex
  • 10full: 10M full-duplex
  • 10half: 10M half-duplex
  • auto: Automatically negotiate the fastest common speed (default)

description <string>

Enter a description of the interface (character limit = 63).

alias <string>

Enter an alias for the interface.

mtu <integer>

Set the maximum transportation unit (68 - 9000, default = 1500).

Variables forconfig ipv6subcommand:

ip6-address <ipv6 prefix>

IPv6 address/prefix of interface.

ip6-allowaccess {http https https-logging ping snmp ssh webservice}

Allow management access to the interface.

ip6-autoconf {enable | disable}

Enable/disable address automatic configuration (SLAAC) (default = enable).

Example

This example shows how to set the FortiManager port1 interface IPv4 address and network mask to 192.168.100.159 and 255.255.255.0, and the management access to ping, https, and ssh.

config system interface

edit port1

set allowaccess ping https ssh

set ip 192.168.110.26 255.255.255.0

set status up

end

interface

Use this command to edit the configuration of a FortiManager network interface.

Syntax

config system interface

edit <port>

set status {up | down}

set ip <ipv4_mask>

set allowaccess {http https ping snmp ssh webservice}

set serviceaccess {fclupdates fgtupdates webfilter-antispam}

set update-service-ip <ip&netmask>

set rating-service-ip <ip&netmask>

set speed {1000full 100full 100half 10full 10half auto}

set description <string>

set alias <string>

set mtu <integer>

config ipv6

set ip6-address <ipv6 prefix>

set ip6-allowaccess {http https https-logging ping snmp ssh webservice}

set ip6-autoconf {enable | disable}

end

end

Variable

Description

<port>

The port can be set to a port number such as port1, port2, port3, or port4. Different FortiManager models have different numbers of ports.

status {up | down}

Start (up) or stop (down) the interface (default = up). If the interface is stopped it does not accept or send packets. If you stop a physical interface, VLAN interfaces associated with it also stop.

ip <ipv4_mask>

Enter the interface IPv4 address and netmask. The IPv4 address cannot be on the same subnet as any other interface.

allowaccess {http https ping snmp ssh webservice}

Enter the types of management access permitted on this interface. Separate multiple selected types with spaces.

If you want to add or remove an option from the list, retype the list as required.

serviceaccess {fclupdates fgtupdates webfilter-antispam}

Enter the types of service access permitted on this interface. Separate multiple selected types with spaces. If you want to add or remove an option from the list, retype the list as required.

  • fclupdates: FortiClient updates access.
  • fgtupdates: FortiGate updates access.
  • webfilter-antispam: Web filtering and antispam access.

update-service-ip <ip&netmask>

The IP address for the FortiGate update service. It must be on the same subnet as the interface IP address.

This variable is only available when serviceaccess is fgtupdates.

rating-service-ip <ip&netmask>

The IP address for the FortiGate rating service. It must be on the same subnet as the interface IP address.

This variable is only available when serviceaccess is webfilter-antispam.

speed {1000full 100full 100half 10full 10half auto}

Enter the speed and duplexing the network port uses:

  • 100full: 100M full-duplex
  • 100half: 100M half-duplex
  • 10full: 10M full-duplex
  • 10half: 10M half-duplex
  • auto: Automatically negotiate the fastest common speed (default)

description <string>

Enter a description of the interface (character limit = 63).

alias <string>

Enter an alias for the interface.

mtu <integer>

Set the maximum transportation unit (68 - 9000, default = 1500).

Variables forconfig ipv6subcommand:

ip6-address <ipv6 prefix>

IPv6 address/prefix of interface.

ip6-allowaccess {http https https-logging ping snmp ssh webservice}

Allow management access to the interface.

ip6-autoconf {enable | disable}

Enable/disable address automatic configuration (SLAAC) (default = enable).

Example

This example shows how to set the FortiManager port1 interface IPv4 address and network mask to 192.168.100.159 and 255.255.255.0, and the management access to ping, https, and ssh.

config system interface

edit port1

set allowaccess ping https ssh

set ip 192.168.110.26 255.255.255.0

set status up

end