Comandos en Fortigate

Algunos comandos útiles para administrar un Fortigate. Para no variar… cada fabricante sigue su nomenclatura…


Echar un ojo a este otro post

Get system arp ->Para mirar la tabla de ARP’s

Get system interface -> Definición de los interfaces.

Get system performance status (ademas de datos de conexiones, memoria … te da el uptime).

Aquí los comandos son exec …

así que exec ping, exec traceroute y exec reboot funcionan…

Se puede usar exec ping-options (source auto o source interface)
Todas las opciones:

– adaptive-ping FortiGate sends next packet as soon as the last response is received.
– data-size Specify the datagram size in bytes.
– df-bit {yes | no}Set df-bit to yes to prevent the ICMP packet from being fragmented. Set df-bit to no to allow the ICMP packet to be fragmented.
– pattern <2-byte_hex> Used to fill in the optional data buffer at the end of the ICMP packet. The size of the buffer is specified using the data_size parameter. This allows you to send out packets of different sizes for testing the effect of packet
size on the connection.
– repeat-count Specify how many times to repeat ping.
– Source {auto |} :Specify the FortiGate interface from which to send the ping. If you specify auto, the FortiGate unit selects the source address and interface based on the route to the or . Specifying the IP
address of a FortiGate interface is used to test connections to different network segments from the specified interface.
– timeout Specify, in seconds, how long to wait until ping times out.
– tos Set the ToS (Type of Service) field in the packet header to provide an indication of the quality of service wanted.
– lowdelay = minimize delay
– throughput = maximize throughput
– reliability = maximize reliability
– lowcost = minimize cost
– ttl Specify the time to live. Time to live is the number of hops the ping packet should be allowed to make before being discarded or returned.
– validate-reply {yes | no} Select yes to validate reply data.
– view-settings : Display the current ping-option settings.

También funciona exec factoryreset, pero yo no lo haría salvo que tengas una conexión por el puerto de management.

Mirar los tiempos de timeout

Show system session-ttl

Se puede modificar a nivel general

config system session-ttl
set default 3000

O para un puerto en concreto

config system session-ttl
set default 3000
config port
edit 80
set timeout 9000
next
end
end

get hardware nic portn -> macs de los interfaces (y mas información).

Para activar/desactivar el envio de logs a un syslog remoto
config log syslogd setting
set status enable/disable
set server xx.xx.xx.xx
end

Hay 3 posibles syslog, syslogd, syslogd1, syslogd2

Forzar failover
diagnose sys ha reset-uptime

Para mandar la configuración a los del soporte:
Antes de nada
config system console
set output standard
end (esto es para quitarte todos los «more»).

exec backup full-config tftp|usb username xx.xx.xx.xx passwd (username y passwd te lo puedes saltar si no lo usas), si no puedes usar el tipico show full-config de toda la vida.

Mirar la tabla de rutas: get router info routing-table details

Mirar las fuentes de alimentacion: diagnose hardware deviceinfo psu

Un enlace con mas información sobre comandos útiles.

http://itsecworks.com/2011/07/18/fortigate-basic-troubleshooting-commands/