Git Product home page Git Product logo

asa-to-srx-converter's Introduction

asa-to-srx-converter

Convert an Cisco ASA configuration to Juniper SRX

Inspired by the opposite version of this project written in Python2 SRX-to-ASA-Converter this project seeks to convert a Cisco ASA configuration to the Junos set commands for Juniper SRX devices. This project is designed to help speed up the migration to SRX, but does not completely convert the configuration.

You will need to validate all set statements before running them on your SRX device. I cannot provide support for your migration and code is provided as-is

Design requirements and features:

  • It was written to only convert Object Network, Object Service, Object-Group, and Access-Lists statements
  • allows you to override the asa interfaces to new names
  • provides logging on which lines were missed or skipped in the asa config
  • Creates application-sets if there are over 8 applications in a object service
  • Keeps applications together where the source and destination where the same on ASA
  • It ignores any nat and crypto ca statements
  • It ignores deny and any any access-lists
  • It creates zones based on interfaces, but doesn't assign reth numbers

Requirements

  • Python 3.9.5

Dependencies

Uses the following Builtin modules

  • argparse
  • ipaddress
  • re
  • csv
  • logging
  • IPv4Address, IPv4Network, ip_network from ipaddress
  • getservbyname from socket
  • sha1 from hashlib

Examples


Outputs the converted configuration to the specified filed. Logging is returned to stdout
python3 ./convert.py path/to/asa_run_config path/to/output


Returns both config and logging to stdout
python3 ./convert.py path/to/asa_run_config path/to/output --passthrough


Overrides the interfaces in the asa with a CSV consisting of zone and network.

zones.csv:

zone,network
default_zone,0.0.0.0/0
dmz,10.9.8.0/24
internal,192.168.0.0/24

python3 ./convert.py path/to/asa_run_config path/to/srx_output -zo zones.csv


Set the logging level to info (which shows the lines skipped in the asa config) and save to a file.

python3 ./convert.py path/to/asa_run_config path/to/srx_output --log info --logFile path/to/log_file

asa-to-srx-converter's People

Contributors

joshcorr avatar

Watchers

 avatar  avatar

Forkers

miezuit lijuk39

asa-to-srx-converter's Issues

Its working?

Hi, its currently working with any version of ASA?

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.