meta data de esta página
  •  

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
hardware:fortigate:debug [2019/06/14 14:23] – [DNS] lchardware:fortigate:debug [2023/01/18 14:36] (actual) – editor externo 127.0.0.1
Línea 1: Línea 1:
 {{tag>fortigate debug troubleshooting}} {{tag>fortigate debug troubleshooting}}
-===== Comandos de Debug =====+===== Debug ===== 
 +Con debug podemos analizar el flujo del tráfico de red de una conexión.  Para ver las opciones del comando  
 +<sxh>diag debug flow ?</sxh> 
 +<sxh> diagnose debug flow filter ? 
 +clear     Clear filter. 
 +vd        Index of virtual domain. 
 +proto     Protocol number. 
 +addr      IP address. 
 +saddr     Source IP address. 
 +daddr     Destination IP address. 
 +port      port 
 +sport     Source port. 
 +dport     Destination port. 
 +negate    Inverse filter. 
 +</sxh> 
 +Algunos ejemplos: 
 +  * diagnose debug flow filter addr x.x.x.x 
 +  * diagnose debug flow filter saddr x.x.x.x (ip origen) 
 +  * diagnose debug flow filter daddr x.x.x.x (ip destino) 
 + 
 + 
 +Números de protocolos más usados (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) 
 +  *  Protocol number 1: ICMP 
 +  *  Protocol number 6: TCP 
 +  * Protocol number 17: UDP 
 + 
 + 
 +Para saber si estamos ejecutando algún filtro  
 +<sxh>diagnose debug info</sxh>
 Es muy importante después de ejecutar alguno de los comandos de debug, el borrar la traza y deshabilitar el debug Es muy importante después de ejecutar alguno de los comandos de debug, el borrar la traza y deshabilitar el debug
-<sxh>diag debug flow trace stop +<sxh> 
-diag debug reset+diag debug disable 
 +diag debug flow trace stop
 diag debug flow filter clear diag debug flow filter clear
-diag debug disable</sxh>+diag debug reset</sxh> 
 + 
 +Como  ejemplo vamos a analizar el tráfico desde una dirección ip hacia el servidor de google 8.8.8.8  
 +<sxh> 
 +diagnose debug reset 
 +diagnose debug flow filter saddr 192.168.1.1 
 +diagnose debug flow filter daddr 8.8.8.8 
 +diagnose debug flow show console enable 
 +diagnose debug enable 
 +diagnose debug flow trace start 10 
 +diagnose debug disable 
 +</sxh
 +<note> a partir de la versión 5.6 ya no hace falta poner el la opción **diagnose debug flow show console enable**</note>
  
 === Debug de un puerto === === Debug de un puerto ===
Línea 29: Línea 70:
 diag debug enable</sxh> diag debug enable</sxh>
  
 +
 +==== Significado de los flags de la traza ====
 +  * [.] = Ack set
 +  * [S] = Syn set
 +  * [S.] = Syn set, Ack Set
 +  * [F] = Fin set
 +  * [F.] = Fin set, Ack Set
 +  * [R] = Reset set
 +  * [R.] = Reset set , Ack Set
  
 ==== Referencias ==== ==== Referencias ====
 +  * https://iserghini.com/2018/07/24/fortinet-fortigate-troubleshooting-traffic-flows/
   * https://www.schalley.eu/2016/11/10/troubleshooting-fortigate-command-line-check-debugging-trace-sniffer/   * https://www.schalley.eu/2016/11/10/troubleshooting-fortigate-command-line-check-debugging-trace-sniffer/
 +  * https://kb.fortinet.com/kb/documentLink.do?externalID=FD31702
 +  * https://kb.fortinet.com/kb/microsites/search.do?cmd=displayKC&docType=kc&externalId=FD30038