How to delete FortiGate log entries stored in memory or
local disk.
It is assumed that memory or local disk logging is enabled on the
FortiGate and other log options enabled (at Protection Profile level for
example).
1- Example to delete logs from local disk for
only WEB Filtering entries (*):
FGT#
execute log filter device 0
FGT# execute log filter category 3
FGT# execute log delete
This will delete webfilter log
Do you want to continue? (y/n) y
2- Example to delete logs from memory for only
WEB Filtering entries (*):
FGT#
execute log filter device 1
FGT# execute log filter category 3
FGT# execute log delete
This will delete webfilter log
Do you want to continue? (y/n) y
3- Example to delete all local logs ( memory and
local disk ) :
FGT# execute log
delete-all
This will delete all local logs
Do you want to continue? (y/n) y
(*)_Note : To get the device and category
list, type the filter command without argument .
FGT# execute log filter device
Available devices:
0: disk
1: memory
2: faz
4: fds
Forgot your Cisco router password? Did you know you can change them without losing your configuration? In this brief how-to, I will walk you through it. In order to perform a password recovery, you will need to reboot the router a couple of times. This means downtime, but it is a good sacrifice to make in order to get your passwords reset.
First, hook up the DB9 end of the standard light blue serial cable to your serial port. The other end of the cable should plug into the port labeled “Console” on the back of the Cisco router. If you do not have a serial port, then you'll need to go purchase a USB-to-serial adapter cable and install it on your computer.
Now that your hardware is connected, establish a serial connection with the router.
The settings you need are: Baud: 9600 Data bits: 8 Parity: No Stop bits: 1 Flow Control: None
On Windows, I use putty for this connection. Yes, putty can be used to make serial connections as well as telnet/ssh. Hyperterminal works great as well. On Linux, I use minicom and on FreeBSD/OpenBSD, I use cu (cu -s 9600 -l /dev/cuad0).
Reboot the router and press the Break key to interrupt the boot sequence.
Type confreg 0x2142. This tells the router to bypass NVRAM during bootup. In other words, your existing configuration won't be loaded. The good news is that it won't be deleted either.
Type reset to reboot the router. Answer No when prompted to run setup.
Type copy start run. This loads your startup configuration into memory.
Now, if you type a show run config, you'll see the router configuration. Also, you should notice that your router name is now in the prompt instead of the default “Router”.
To Change the enable secret - “enable secret new_password”
To Change the admin log in - “username admin_name password new_password”
Change the register back to 0x2102: config-register 0x2102
When the router reboots it will load the old configuration with the new password.
Save the password so that it will be persistent during reboots, type copy run start
Reboot the router by typing reload at the enable prompt.
Now, keep that password in a nice safe place – in your head does not count. I keep mine saved in a safe place for future retrieval and I make sure my customers have a copy as well. Remember, passwords are nice until you forget them.
To enable a DHCP server, go to System > Network > Interface. Edit the interface, and select Enable for the DHCP Server row. In here we can assign the address range, sub net mask, default gateway and dns server.
Now check the IP confugration settings. As shown in below figure, lease period is set to 7 days and we can only assign one DNS Server in above settings.
To change lease time and add more dns servers we have to do modify the configuration through CLI Console.
First enter below command line. config system dhcp server
Type get to list all DHCP Servers. As shown in below figure I have 4 DHCP Servers.
Type edit <server entry number> and hit enter. And see the current DHCP Server configuration.
DHCP Server default lease-time is 604800 = 1 Week = 7 Days
So I am going to change the DHCP Lease-time to 1 Day = 86400 Seconds
Type below command set the lease-time set lease-time 86400
To add another DNS Server (Alternative) type below command. set dns-server2 <IP Address>
Type end to end the current session and see the DHCP configuration on the interface.
Do ipconfig /release and ipconfig /renew in computer's command prompt and verify the new IP Configuration.