Fortigate Troubleshooting Commands Itsecworks PDF
Fortigate Troubleshooting Commands Itsecworks PDF
About
Rate This
Check S em a
myfirewall # ge em pe fo mance a
CPU states: 0% user 0% system 0% nice 100% idle
Memory states: 41% used
Average network usage: 2 kbps in 1 minute, 2 kbps in 10 minutes, 2 kbps in 30 minutes
Average sessions: 5 sessions in 1 minute, 5 sessions in 10 minutes, 5 sessions in 30 minutes
Virus caught: 0 total in 1 minute
IPS attacks blocked: 0 total in 1 minute
Uptime: 1 days, 1 hours, 8 minutes
Check of a e e ion
myfirewall # ge a
Version: Fortigate-200B 3.00,build0660,080201
Virus-DB: 8.631(2008-01-15 14:27)
IPS-DB: 2.461(2008-01-18 11:23)
Serial-Number: FG200B1111111111
BIOS version: 04000000
Log hard disk: Not available
Hostname: myfirewall
Operation Mode: NAT
Current virtual domain: root
Max number of virtual domains: 10
Virtual domains status: 1 in NAT mode, 0 in TP mode
Virtual domain configuration: disable
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 1/16
3/7/12 Fortigate troubleshooting commands itsecworks
Check HA a e
myfirewall1 # ge ha a
Model: 311
Mode: a-p
Group: 0
Debug: 0
ses_pickup: enable
Master:254 myfirewall1 FG311B1111111111 0
Slave :128 myfirewall2 FG311B1111111112 1
number of vcluster: 1
vcluster 1: work 10.0.0.1
Master:0 FG311B1111111111
Slave :1 FG311B1111111112
myfirewall # ho ha
config system ha
set mode a-p
set hbdev “port5 20 “port6 10
set session-pickup enable
set override enable
set priority 254
set monitor “port4 “port5 “port6
end
myfirewall1 # diagno e ha a
HA information
Statistics
traffic.local = s:2096712 p:2541238162 b:1972123729708
traffic.total = s:9497465 p:2541238496 b:1972123977459
activity.fdb = c:0 q:0Model=311, Mode=2 Group=0 Debug=0
nvcluster=1, ses_pickup=1HA group member information: is_manage_master=1.
FG311B1111111111, 0. Master:254 myfirewall1
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 2/16
3/7/12 Fortigate troubleshooting commands itsecworks
Check he e ion
The following list has only one session, that may be a DNS request from 192.168.227.97 to .the dns server
65.39.139.53.
myfirewall # diag sys session listsession info: proto=17 proto_state=01 duration=2214 expire=123 timeout=0
flags=00000000 sockflag=00000000 sockport=0 av_idx=0 use=3
origin-shaper=
reply-shaper=
per_ip_shaper=
ha_id=0 hakey=28310
policy_dir=0 tunnel=/
state=local
statistic(bytes/packets/allow_err): org=5095/76/1 reply=8757/75/1 tuples=2
orgin->sink: org out->post, reply pre->in dev=10->12/12->10 gwy=0.0.0.0/192.168.227.97
hook=out dir=org act=noop 192.168.227.97:54223->65.39.139.53:53(0.0.0.0:0)
hook=in dir=reply act=noop 65.39.139.53:53->192.168.227.97:54223(0.0.0.0:0)
misc=0 policy_id=0 auth_info=0 chk_client_info=0 vd=0 serial=0047c5b4 tos=ff/ff imp2p=0 app=0
dd_type=0 dd_rule_id=0
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 3/16
3/7/12 Fortigate troubleshooting commands itsecworks
total session 7
Fil e o he e ion ha o looking fo (e ample)
Driver_Name ip175c
Driver_Version 1.01
System_Device_Name internal
Current_HWaddr 00:09:11:6f:88:e3
Permanent_HWaddr 00:09:11:6f:88:e3
Link up
Speed 100
Duplex full
State up (0×00001103)
MTU_Size 1500
…
myfirewall # ge em a p
Address Age(min) Hardware Addr Interface
5.5.5.5 0 00:00:5e:00:44:a6 wan1
The most significant part for vpn is the time on the devices. The check the time use the following command:
myfirewall # ge a
Version: Fortigate-200B 3.00,build0660,080201
Virus-DB: 8.631(2008-01-15 14:27)
IPS-DB: 2.461(2008-01-18 11:23)
Serial-Number: FG200B1111111111
BIOS version: 04000000
Log hard disk: Not available
Hostname: myfirewall
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 5/16
3/7/12 Fortigate troubleshooting commands itsecworks
Check he nnel a e
If there is no SA that means the tunnel is down and does not work. To see if the tunnel is up we need to check if
any SA exist.
To see if the tunnel is up you can use the diagno e pn nnel li name <peer-name> or diagno e pn
nnel d mp a command.
T nnel a e i do n
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 6/16
3/7/12 Fortigate troubleshooting commands itsecworks
T nnel a e i p
In the following output the second tunnel with the name fortigw-311b-wlan-ph2 is down.
vf=0 tun=fortigw-311b
proxyid=fortigw-311b-ph2 proto=0
src: 192.168.10.0/255.255.255.0:0
dst: 0.0.0.0/0.0.0.0:0
life: type=01 bytes=0/0 timeout=1753/1800
dec: spi=5bafd6ab esp=3des key=24 506055a1caf78cc42d645a94b226f37375eac8bb618efdc7
ah=sha1 key=20 535c1f8ef20e8b7b6d011fdecfa955cef2085995
enc: spi=2a05ad95 esp=3des key=24 1d710d27da29b773abdf3568200d3b4a2688fbc1fa72f43b
ah=sha1 key=20 1d7d6b36084c715e8546369b621effaca60a5ee4
To see if the encryption and decryption of the packages works use 2 or more times the diagno e pn ip ec
a or the diagno e pn nnel li command and compare the values. On the second and third outputs the
counter should show larger number.
myfirewall1 # diagno e pn ip ec a
All ipsec crypto devices in use:
CP5:
null: 0 0
des: 0 0
3des: 1667203998 1374539508
aes: 0 0
null: 0 0
md5: 0 0
sha1: 1667203998 1374539508
SOFTWARE NULL:
null: 0 0
des: 0 0
3des: 0 0
aes: 0 0
null: 0 0
md5: 0 0
sha1: 0 0myfirewall1 # diagno e pn ip ec a
All ipsec crypto devices in use:
CP5:
null: 0 0
des: 0 0
3des: 1667204059 1374539566
aes: 0 0
null: 0 0
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 8/16
3/7/12 Fortigate troubleshooting commands itsecworks
md5: 0 0
sha1: 1667204059 1374539566
SOFTWARE NULL:
null: 0 0
des: 0 0
3des: 0 0
aes: 0 0
null: 0 0
md5: 0 0
sha1: 0 0myfirewall1 #
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 9/16
3/7/12 Fortigate troubleshooting commands itsecworks
——————————————————
name=soho-fw3 1.1.1.1:0->5.5.5.5:0 lgwy=dyn tun=intf mode=auto bound_if=7
5.0 niffe ace
The 2. parameter after “…port6 arp 1 is the number of packets to be sniffered. In this example it is set to 2.
If the sniffer should be analysed with Wireshark, the following pl script should be used:
fgt2eth.pl
http://kb.fortinet.com/kb/microsites/microsite.do?cmd=displayKC&externalId=FD30877
There are some fields that you wont ever see in webui as in the column setting you cannot choose them. Just an
example for this is a false pre-shared key, the field that tells you what the problem is, called “error_reason”.
The buffer size is limited and if the buffer is full the old logs will be overwritten.
To check your buffer size issue the following command:
To view the logs on the CLI issue the following commands (it is better to use a syslog server as checking the logs
from memory, it is slow).
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 10/16
3/7/12 Fortigate troubleshooting commands itsecworks
In this example we can sse a failed vpn session as the preshared key is not identical on the vpn peers. The logs
are not in every cases so talkative, for example the logs for different encryption traffic failure refer to nothing
usefull.
Log fo p e ha ed ke fail e:
CLI guide:
http://docs.fortinet.com/fgt/techdocs/fortigate-cli.pdf
With an example:
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 12/16
3/7/12 Fortigate troubleshooting commands itsecworks
Example Restore:
myfirewall1 login:
AD E R T ISE M E N T
AD E R T ISE M E N T
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 13/16
3/7/12 Fortigate troubleshooting commands itsecworks
Leave a Repl
Name (required)
Website
Search
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 14/16
3/7/12 Fortigate troubleshooting commands itsecworks
A chi e
February 2012
December 2011
November 2011
September 2011
August 2011
July 2011
March 2011
December 2010
November 2010
Ca ego ie
Security (53)
Checkpoint (9)
IPSO (4)
Backup (1)
Installation (2)
Provider1 (2)
Troubleshootings (2)
Cisco (31)
ASA (24)
Admin access (1)
AIP-SSM (2)
Application Filtering (1)
Failover (2)
Multiple Context (2)
Nat (1)
Overloaded (2)
Routing (1)
Troubleshootings (5)
VPN (9)
WCCP (1)
FWSM (1)
IOS (5)
Admin access (1)
Application Filtering (3)
GUI (1)
Troubleshootings (1)
Logging (1)
Fortigate (2)
Configuration (1)
Troubleshooting (1)
Linux (11)
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 15/16
3/7/12 Fortigate troubleshooting commands itsecworks
ddwrt (6)
mail (1)
proxy (1)
tools (2)
openssl (1)
Troubleshooting (1)
Blog at WordPress.com.
Theme: Inuit Types by BizzArtic.
itsecworks.wordpress.com/2011/07/18/fortigate-basic-troubleshooting-commands/ 16/16