How ivankuchin/ftd-acl-optimizer works
Project type and purpose
• This is a standalone, open-source CLI tool written in Rust (“FTD Access Control Rule Optimizer”).
• It parses the output of Cisco FTD’s show access-control-config, builds an in-memory model of ACL rules, applies subnet and port optimizations (shadow, overlap, adjacency), and produces a report on rule entry counts before and after optimizations.
File structure
• Top-level Rust project (Cargo.toml, Cargo.lock), with CI/CD workflows under .github.
• src/main.rs wires everything together.
• src/args.rs + src/cli/ handle the command-line interface and options.
• src/acp/reader.rs ingests raw CLI text into data structures under src/acp/rule/.
• Rule sub-modules:
• network_object and protocol_object describe and group IP ranges, subnets, ports.
• Optimizer logic lives in files suffixed _optimized.rs.
• Utilities, grouping and intermediate representations spread across src/acp/rule/network_object/utilities.rs and similar protocol-object helpers.
README for additional insights
• The README explains the calculation of ACE (Access Control Entries) and the three optimization types: shadow, overlap, adjacency.
• Use case: run via ftd-acl-optimizer analyze -f collected_output.txt.
• No external services or databases—pure in-memory processing and console/file output.