Chapter 10 Install and System Administration for FortiOS 5.0 : Using the CLI : Tips : Editing the configuration file on an external host
  
Editing the configuration file on an external host
You can edit the FortiGate configuration on an external host by first backing up the configuration file to a TFTP server. Then edit the configuration file and restore it to the FortiGate unit.
Editing the configuration on an external host can be timesaving if you have many changes to make, especially if your plain text editor provides advanced features such as batch changes.
To edit the configuration on your computer
1. Use execute backup to download the configuration file to a TFTP server, such as your management computer.
2. Edit the configuration file using a plain text editor that supports Unix-style line endings.
 
Do not edit the first line. The first line(s) of the configuration file (preceded by a # character) contains information about the firmware version and FortiGate model. If you change the model number, the FortiGate unit will reject the configuration file when you attempt to restore it.
3. Use execute restore to upload the modified configuration file back to the FortiGate unit.
The FortiGate unit downloads the configuration file and checks that the model information is correct. If it is, the FortiGate unit loads the configuration file and checks each command for errors. If a command is invalid, the FortiGate unit ignores the command. If the configuration file is valid, the FortiGate unit restarts and loads the new configuration.
See Also
Help
Shortcuts and key commands
Command abbreviation
Environment variables
Special characters
Using grep to filter get and show command output
Language support and regular expressions
Screen paging
Baud rate
Using Perl regular expressions
Connecting to the CLI
Command syntax
Sub-commands
Tips