Coder Social home page Coder Social logo

mbaniadam / multivendor-firewall-backup-script Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 47 KB

Multivendor firewall backup script

Python 100.00%
backup backup-script firepower firewall fortinet-firewall juniper nornir-netmiko rest-api python3 automation

multivendor-firewall-backup-script's Introduction

Multivendor firewall backup script

This script is designed to automate the backup process of configurations for Multi-Vendor Firewalls. It utilizes the Nornir framework along with Netmiko to retrieve and save configurations from Juniper (Junos OS and ScreenOS), Fortinet, and Cisco Firepower FTD devices. The script supports both RestAPI and SSH methods for retrieving configurations, making it versatile and adaptable to different firewall models.

Prerequisites

Before using this script, ensure you have the following prerequisites in place:

Python Environment:

  • Python 3.x installed on your machine.
  • Required Python packages installed. You can install them using pip:
pip install nornir netmiko

Network Inventory:

Create a YAML inventory file (inventory.yaml) with the details of your firewall devices. Here's a sample format:

---
FW1:
  hostname: 192.168.1.112
  username: admin
  password: admin
  port: 22
  platform: juniper_junos
  data:
      site: 1
      role: firewall
      type: network_device

FW2:
  hostname: 192.168.1.113
  username: admin
  password: admin
  port: 22
  platform: fortinet
  data:
      site: 2
      role: firewall
      type: http

Usage

Clone this GitHub repository to your local machine.

Update the inventory file (inventory.yaml) with your firewall device details.

Run the script using the following command:

python MultivendorBackup.py

The script will connect to each device based on the provided inventory and retrieve and save their configurations in separate text files.

Supported Vendors and Methods

Vendors: Juniper:

  • Junos OS
  • ScreenOS

Fortinet:

  • FortiGate

Cisco Firepower FTD

Methods: RestAPI SSH

Screenshot 2022-08-22 160338

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.