정보보안, 해킹, IT지식/네트워크 지식

FortiOS Administrator Configuration Backup 방법 - CLI

Black hawke 2023. 8. 7. 13:24
728x90
반응형

CLI(Command Line Interface)로 접속하여 Configuration 백업 및 복원(Backup & Restore) 하는

방법에 대해 알아 보겠습니다. Fortinet FortiOS 7.2.3 Firmware 기준

FortiOS admin Guide

CLI로 접속하여 Configuration 백업 

 

명령어 execute backup 사용하여 FrotiOSYAML 형식으로 백업 수행 

( FortiGate-80F v6.4.6,build6083,210729 (GA)에는 일부 명령어가 없다)

   fg # execute backup 

 

               config           config
               disk             disk
               full-config      full-config
               ipsuserdefsig    ipsuserdefsig
               memory           memory

             * yaml-config

             * obfuscated-config

             * obfuscated-full-config

             * obfuscated-yaml-config

   fg # execute backup config 


               flash                 Backup config file to flash.  :  : 플래시 드라이브에 백업
               ftp                   Backup config file to ftp server. :  FTP 서버에 백업
               management-station    Backup config file to management station.

                                   : FortiManager 또는 Fortigate와 같은 관리 스테이션 Cloud에 백업
               tftp                  Backup config file to TFTP server.   : TFTP 서버에 백업
               usb                   Backup config file to USB disk.    : USB 드라이브에 백업
               usb-mode              Backup config file for USB mode.  usb 드라이브에 백업

            * sftp  :  SFTP 서버에 백업

   fg #  execute backup full-config 


              ftp         Backup full config file to FTP server.
              tftp        Backup full config file to TFTP server.

              usb         Backup full config file to USB disk.
              usb-mode    Backup full config file for USB mode.

 

1.FTP Server를 이용한 백업(port 번호, 사용자 이름은 선택사항에 따른다)

    #execute backup config ftp <ftp_filename> <ftp_server> [ <ftp:port>] [<username>] [<password>] [<backup_password>]

2.TFTP Server를 이용한 백업  

  #execute backup config tftp <backup_filename> <tftp_server> [<backup_password>]

3.SFTP

  #execute backup config sftp <backup_filename> <sftp_server> [<sftp_port>] <user> <password> [<backup_passord>]

또는 #execute backup config management-station < comment > ,

        #execute backup config usb <back_filename><backup_password>

 

4. VDOM 구성 백업

    config vdom

              edit <vdom_name>

5. YAML 형식의 백업

  #execute backup yaml-config [ ftp | tftp ] <file_name><server> [username] [password]

 

6. 백업 파일의 난독화(obfuscated passwords) 및 보안 Mask 처리하여  백업 

    - 부득이하게 타사와 컨피그 파일(Config File) 공유시 보안 적용

    - 의도하지않은 정보 유출 방지 

         #execute backup obfuscated-config { flash | ftp | management-station | sftp | tftp | usb}

  전체 컨피그래이션 비밀번호 masking

         #execute backup obfuscated-full-config { ftp | sftp | tftp | usb}

   Yaml 형식으로 비밀번호 Masking 

         #execute backup obfuscated-yaml-config { ftp  | tftp }

CLI로 접속하여 Configuration 복원(Restore)

fg # execute restore 


             av                 av
             config             config
             image              image
             ips                ips
             ipsuserdefsig      ipsuserdefsig
             other-objects      other-objects
             script             script
             secondary-image    secondary-image
             src-vis            src-vis

fg # execute restore config (FortiOS format :포티OS 형식)


               dhcp                  Load config file via DHCP.
               flash                 Load config file from flash to firewall.
               ftp                   Load config file from FTP server.
               management-station    management-station
               tftp                  Load config file from TFTP server to firewall.
               usb                   Load config file from USB disk to firewall.
               usb-mode              Load config file from USB disk and reboot.

 

fg # execute restore yamlconfig ( YAML format : yaml 형식)

 

               ftp                   Load config file from FTP server.

               tftp                  Load config file from TFTP server to firewall.

 

 FortiOS 형식의 컨피그 파일 복원(Restore configuration in FortiOS format)

  1.FTP

      #execute restore config ftp <backup_filename> <ftp_server> [ <ftp:port>] [<username>] [<password>] [<backup_password>]

  2.TFTP

     #execute resotre config tftp <backup_filename> <tftp_server> [<backup_password>]
  3. FortOS 또는 Cloude를 통한 복원

     #execute restore config management-station normal <revision ID>

      #execute backup config usb <back_filename><backup_password>

YAML 형식의 복원

    #execute restore yaml-config [ ftp | tftp ] <file_name><server> [username] [password]

728x90