Page 736 / 944 Scroll up to view Page 731 - 735
Chapter 46 Log and Report
ZyWALL USG 50 User’s Guide
736
System log
Select which events you want to log by
Log Category
. There are three
choices:
disable all logs
(red X) - do not log any information from this category
enable normal logs
(green checkmark) - create log messages and
alerts from this category
enable normal logs and debug logs
(yellow check mark) - create log
messages, alerts, and debugging information from this category; the
ZyWALL does not e-mail debugging information, however, even if this
setting is selected.
E-mail Server
1 E-mail
Select whether each category of events should be included in the log
messages when it is e-mailed (green check mark) and/or in alerts (red
exclamation point) for the e-mail settings specified in
E-Mail Server 1
.
The ZyWALL does not e-mail debugging information, even if it is
recorded in the
System log
.
E-mail Server
2 E-mail
Select whether each category of events should be included in log
messages when it is e-mailed (green check mark) and/or in alerts (red
exclamation point) for the e-mail settings specified in
E-Mail Server 2
.
The ZyWALL does not e-mail debugging information, even if it is
recorded in the
System log
.
Remote Server
1~4
For each remote server, select what information you want to log from
each
Log Category
(except
All Logs
; see below). Choices are:
disable all logs
(red X) - do not log any information from this category
enable normal logs
(green checkmark) - log regular information and
alerts from this category
enable normal logs and debug logs
(yellow check mark) - log regular
information, alerts, and debugging information from this category
OK
Click this to save your changes and return to the previous screen.
Cancel
Click this to return to the previous screen without saving your changes.
Table 232
Configuration > Log & Report > Log Setting > Active Log Summary
LABEL
DESCRIPTION
Page 737 / 944
ZyWALL USG 50 User’s Guide
737
C
HAPTER
47
File Manager
47.1
Overview
Configuration files define the ZyWALL’s settings. Shell scripts are files of
commands that you can store on the ZyWALL and run when you need them. You
can apply a configuration file or run a shell script without the ZyWALL restarting.
You can store multiple configuration files and shell script files on the ZyWALL. You
can edit configuration files or shell scripts in a text editor and upload them to the
ZyWALL. Configuration files use a .conf extension and shell scripts use a .zysh
extension.
47.1.1
What You Can Do in this Chapter
Use the
Configuration File
screen (see
Section 47.2 on page 740
) to store and
name configuration files. You can also download configuration files from the
ZyWALL to your computer and upload configuration files from your computer to
the ZyWALL.
Use the
Firmware Package
screen (see
Section 47.3 on page 744
) to check
your current firmware version and upload firmware to the ZyWALL.
Use the
Shell Script
screen (see
Section 47.4 on page 746
) to store, name,
download, upload and run shell script files.
47.1.2
What you Need to Know
Configuration Files and Shell Scripts
When you apply a configuration file, the ZyWALL uses the factory default settings
for any features that the configuration file does not include. When you run a shell
script, the ZyWALL only applies the commands that it contains. Other settings do
not change.
Page 738 / 944
Chapter 47 File Manager
ZyWALL USG 50 User’s Guide
738
These files have the same syntax, which is also identical to the way you run CLI
commands manually. An example is shown below.
While configuration files and shell scripts have the same syntax, the ZyWALL
applies configuration files differently than it runs shell scripts. This is explained
below.
You have to run the example in
Figure 429 on page 738
as a shell script because
the first command is run in
Privilege
mode. If you remove the first command,
you have to run the example as a configuration file because the rest of the
commands are executed in
Configuration
mode.
Comments in Configuration Files or Shell Scripts
In a configuration file or shell script, use “#” or “!” as the first character of a
command line to have the ZyWALL treat the line as a comment.
Figure 429
Configuration File / Shell Script: Example
# enter configuration mode
configure terminal
# change administrator password
username admin password 4321 user-type admin
# configure ge3
interface ge3
ip address 172.23.37.240 255.255.255.0
ip gateway 172.23.37.254 metric 1
exit
# create address objects for remote management / to-ZyWALL firewall rules
# use the address group in case we want to open up remote management later
address-object TW_SUBNET 172.23.37.0/24
object-group address TW_TEAM
address-object TW_SUBNET
exit
# enable Telnet access (not enabled by default, unlike other services)
ip telnet server
# open WAN-to-ZyWALL firewall for TW_TEAM for remote management
firewall WAN ZyWALL insert 4
sourceip TW_TEAM
service TELNET
action allow
exit
write
Table 233
Configuration Files and Shell Scripts in the ZyWALL
Configuration Files (.conf)
Shell Scripts (.zysh)
Resets to default configuration.
Goes into CLI
Configuration
mode.
Runs the commands in the configuration
file.
Goes into CLI
Privilege
mode.
Runs the commands in the shell script.
Page 739 / 944
Chapter 47 File Manager
ZyWALL USG 50 User’s Guide
739
Your configuration files or shell scripts can use “exit” or a command line consisting
of a single “!” to have the ZyWALL exit sub command mode.
Note: “exit” or “!'” must follow sub commands if it is to make the ZyWALL exit sub
command mode.
Line 3 in the following example exits sub command mode.
Lines 1 and 3 in the following example are comments and line 4 exits sub
command mode.
Lines 1 and 2 are comments. Line 5 exits sub command mode.
Errors in Configuration Files or Shell Scripts
When you apply a configuration file or run a shell script, the ZyWALL processes the
file line-by-line. The ZyWALL checks the first line and applies the line if no errors
are detected. Then it continues with the next line. If the ZyWALL finds an error, it
stops applying the configuration file or shell script and generates a log.
You can change the way a configuration file or shell script is applied. Include
setenv stop-on-error off
in the configuration file or shell script. The ZyWALL
ignores any errors in the configuration file or shell script and applies all of the valid
commands. The ZyWALL still generates a log for any errors.
interface ge1
ip address dhcp
!
!
interface ge1
# this interface is a DHCP client
!
! this is from Joe
# on 2008/04/05
interface ge1
ip address dhcp
!
Page 740 / 944
Chapter 47 File Manager
ZyWALL USG 50 User’s Guide
740
47.2
The Configuration File Screen
Click
Maintenance > File Manager > Configuration File
to open the
Configuration File
screen. Use the
Configuration File
screen to store, run, and
name configuration files. You can also download configuration files from the
ZyWALL to your computer and upload configuration files from your computer to
the ZyWALL.
Once your ZyWALL is configured and functioning properly, it is highly
recommended that you back up your configuration file before making further
configuration changes. The backup configuration file will be useful in case you
need to return to your previous settings.
Configuration File Flow at Restart
If there is not a
startup-config.conf
when you restart the ZyWALL (whether
through a management interface or by physically turning the power off and back
on), the ZyWALL uses the
system-default.conf
configuration file with the
ZyWALL’s default settings.
If there is a
startup-config.conf
, the ZyWALL checks it for errors and applies
it. If there are no errors, the ZyWALL uses it and copies it to the
lastgood.conf
configuration file as a back up file. If there is an error, the ZyWALL generates a
log and copies the
startup-config.conf
configuration file to the
startup-
config-bad.conf
configuration file and tries the existing
lastgood.conf
configuration file. If there isn’t a
lastgood.conf
configuration file or it also has
an error, the ZyWALL applies the
system-default.conf
configuration file.
You can change the way the
startup-config.conf
file is applied. Include the
setenv-startup stop-on-error off
command. The ZyWALL ignores any
errors in the
startup-config.conf
file and applies all of the valid commands.
The ZyWALL still generates a log for any errors.
Figure 430
Maintenance > File Manager > Configuration File
Do not turn off the ZyWALL while configuration file upload is in
progress.

Rate

4.5 / 5 based on 2 votes.

Bookmark Our Site

Press Ctrl + D to add this site to your favorites!

Share
Top