File Manager
Configuration Files and Shell Scripts Overview
The File Manager screens allow you to store multiple configuration files and shell script files.
When you apply a configuration file, the ZyWALL uses the factory default settings for any features that the configuration file does not include. Shell scripts are files of commands that you can store on the ZyWALL and run when you need them. When you run a shell script, the ZyWALL only applies the commands that it contains. Other settings do not change.
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.
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.
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.
|
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.
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.
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.
ZyWALL Configuration File Details
You can store multiple configuration files on the ZyWALL. You can also have the ZyWALL use a different configuration file without the ZyWALL restarting.
- When you first receive the ZyWALL, it uses the system-default.conf configuration file of default settings.
- When you change the configuration, the ZyWALL creates a startup-config.conf file of the current configuration.
- The ZyWALL checks the startup-config.conf file for errors when it restarts. If there is an error in the startup-config.conf file, the ZyWALL copies the startup-config.conf configuration file to the startup-config-bad.conf configuration file and tries the existing lastgood.conf configuration file.
- When the ZyWALL reboots, if the startup-config.conf file passes the error check, the ZyWALL keeps a copy of the startup-config.conf file as the lastgood.conf configuration file for you as a back up file. If you upload and apply a configuration file with an error, you can apply lastgood.conf to return to a valid configuration.
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. 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.
Configuration File Screen
Use the Configuration File screen 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.
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.
Warning: Do not turn off the ZyWALL while configuration file upload is in progress.
Maintenance > File Manager > Configuration File
Label
|
Description
|
Download
|
Click a configuration file's row to select it and click Download to save the configuration to your computer.
|
Copy
|
Use this button to save a duplicate of a configuration file on the ZyWALL.
Click a configuration file's row to select it and click Copy to open the Copy File screen.
Specify a name for the duplicate configuration file. Use up to 25 characters (including a-zA-Z0-9;`~!@#$%^&()_+[]{}',.=-).
Click OK to save the duplicate or click Cancel to close the screen without saving a duplicate of the configuration file.
|
Rename
|
Use this button to change the label of a configuration file on the ZyWALL. You can only rename manually saved configuration files. You cannot rename the lastgood.conf, system-default.conf and startup-config.conf files.
You cannot rename a configuration file to the name of another configuration file in the ZyWALL.
Click a configuration file's row to select it and click Rename to open the Rename File screen.
Specify the new name for the configuration file. Use up to 25 characters (including a-zA-Z0-9;`~!@#$%^&()_+[]{}',.=-).
Click OK to save the duplicate or click Cancel to close the screen without saving a duplicate of the configuration file.
|
Remove
|
Click a configuration file's row to select it and click Remove to delete the configuration file from the ZyWALL. You can only delete manually saved configuration files. You cannot delete the system-default.conf, startup-config.conf and lastgood.conf files.
A pop-up window asks you to confirm that you want to delete the configuration file. Click OK to delete the configuration file or click Cancel to close the screen without deleting the configuration file.
|
Apply
|
Use this button to have the ZyWALL use a specific configuration file.
Click a configuration file's row to select it and click Apply to have the ZyWALL use that configuration file. The ZyWALL does not have to restart in order to use a different configuration file, although you will need to wait for a few minutes while the system reconfigures.
|
#
|
This column displays the number for each configuration file entry. The total number of configuration files that you can save depends on the sizes of the configuration files and the available flash storage space.
|
File Name
|
This column displays the label that identifies a configuration file.
You cannot delete the following configuration files or change their file names.
The system-default.conf file contains the ZyWALL's default settings. Select this file and click Apply to reset all of the ZyWALL settings to the factory defaults. This configuration file is included when you upload a firmware package.
The startup-config.conf file is the configuration file that the ZyWALL is currently using. If you make and save changes during your management session, the changes are applied to this configuration file.
The lastgood.conf is the most recently used (valid) configuration file that was saved when the device last restarted.
|
Size
|
This column displays the size (in KB) of a configuration file.
|
Modify
|
This column displays the date and time that the individual configuration files were last changed or saved.
|
Upload Configuration File
|
The bottom part of the screen allows you to upload a new or previously saved configuration file from your computer to your ZyWALL
You cannot upload a configuration file named system-default.conf or lastgood.conf.
If you upload startup-config.conf, it will replace the current configuration and immediately apply the new settings.
|
File Path
|
Type in the location of the file you want to upload in this field or click Browse ... to find it.
|
Browse...
|
Click Browse... to find the .conf file you want to upload. The configuration file must use a ".conf" filename extension. You will receive an error message if you try to upload a fie of a different format. Remember that you must decompress compressed (.zip) files before you can upload them.
|
Upload
|
Click Upload to begin the upload process. This process may take up to two minutes.
|
Firmware Package
Use the Firmware Package screen to check your current firmware version and upload firmware to the ZyWALL.
Note: The web configurator is the recommended method for uploading firmware. You only need to use the command line interface if you need to recover the firmware. See the CLI Reference Guide for how to determine if you need to recover the firmware and how to recover it.
Find the firmware package at www.zyxel.com in a file that (usually) uses the system model name with a .bin extension, for example, "zywall.bin".
The ZyWALL's firmware package cannot go through the ZyWALL when you enable the anti-virus Destroy compressed files that could not be decompressed option. The ZyWALL classifies the firmware package as not being able to be decompressed and deletes it. You can upload the firmware package to the ZyWALL with the option enabled, so you only need to clear the Destroy compressed files that could not be decompressed option while you download the firmware package. See Anti-Virus Policy Edit for more on the anti-virus Destroy compressed files that could not be decompressed option.
Note: The ZyWALL automatically reboots after a successful upload.
Warning: Do not turn off the ZyWALL while firmware upload is in progress!
Maintenance > File Manager > Firmware Package
Label
|
Description
|
Boot Module
|
This is the version of the boot module that is currently on the ZyWALL.
|
Current Version
|
This is the firmware version and the date created.
|
Released Date
|
This is the date that the version of the firmware was created.
|
File Path
|
Type in the location of the file you want to upload in this field or click Browse ... to find it.
|
Browse...
|
Click Browse... to find the .bin file you want to upload. Remember that you must decompress compressed (.zip) files before you can upload them.
|
Upload
|
Click Upload to begin the upload process. This process may take up to two minutes.
|
After you see the Firmware Upload in Process screen, wait two minutes before logging into the ZyWALL again.
The ZyWALL automatically restarts in this time causing a temporary network disconnect.
After two minutes, log in again and check your new firmware version in the HOME screen.
Shell Script Screen
Use shell script files to have the ZyWALL use commands that you specify. Use a text editor to create the shell script files. They must use a ".zysh" filename extension.
Use the Shell Script screen to store, name, download, upload and run shell script files. You can store multiple shell script files on the ZyWALL at the same time.
Note: You should include write commands in your scripts. If you do not use the write command, the changes will be lost when the ZyWALL restarts. You could multiple write commands in a long script.
Maintenance > File Manager > Shell Script
Label
|
Description
|
Download
|
Click a shell script file's row to select it and click Download to save the configuration to your computer.
|
Copy
|
Use this button to save a duplicate of a shell script file on the ZyWALL.
Click a shell script file's row to select it and click Copy to open the Copy File screen.
Specify a name for the duplicate file. Use up to 25 characters (including a-zA-Z0-9;`~!@#$%^&()_+[]{}',.=-).
Click OK to save the duplicate or click Cancel to close the screen without saving a duplicate of the configuration file.
|
Rename
|
Use this button to change the label of a shell script file on the ZyWALL.
You cannot rename a shell script to the name of another shell script in the ZyWALL.
Click a shell script's row to select it and click Rename to open the Rename File screen.
Specify the new name for the shell script file. Use up to 25 characters (including a-zA-Z0-9;`~!@#$%^&()_+[]{}',.=-).
Click OK to save the duplicate or click Cancel to close the screen without saving a duplicate of the configuration file.
|
Delete
|
Click a shell script file's row to select it and click Delete to delete the shell script file from the ZyWALL.
A pop-up window asks you to confirm that you want to delete the shell script file. Click OK to delete the shell script file or click Cancel to close the screen without deleting the shell script file.
|
Run
|
Use this button to have the ZyWALL use a specific shell script file.
Click a shell script file's row to select it and click Run to have the ZyWALL use that shell script file. You may need to wait awhile for the ZyWALL to finish applying the commands.
|
#
|
This column displays the number for each shell script file entry.
|
File Name
|
This column displays the label that identifies a shell script file.
|
Size
|
This column displays the size (in KB) of a shell script file.
|
Modify
|
This column displays the date and time that the individual shell script files were last changed or saved.
|
|
The bottom part of the screen allows you to upload a new or previously saved shell script file from your computer to your ZyWALL.
|
File Path
|
Type in the location of the file you want to upload in this field or click Browse ... to find it.
|
Browse...
|
Click Browse... to find the .zysh file you want to upload.
|
Upload
|
Click Upload to begin the upload process. This process may take up to several minutes.
|