Cisco ASA to FortiGate migration: the mapping, and the traps
An ASA access-list says where traffic comes in. It never says where traffic goes out. Every FortiGate policy has to say both. Most of the work in an ASA to FortiOS migration is filling that gap. Two more decisions matter
An ASA access-list says where traffic comes in. It never says where traffic goes out. Every FortiGate policy has to say both. Most of the work in an ASA to FortiOS migration is filling that gap. Two more decisions matter: which NAT mode you build on, and what the ASA allowed without any rule. This page covers all three, in the order you should do them.
The concept mapping
| ASA | FortiOS | Where it gets awkward |
|---|---|---|
nameif interface |
Interface, optionally grouped in a zone | FortiGate policies can reference interfaces directly. Zones are optional, but they keep the policy count down when several interfaces share a role. |
security-level |
no equivalent | FortiOS denies anything no policy allows (the implicit deny, policy ID 0). See trap 3. |
object network / object-group network
|
firewall address / addrgrp
|
Mostly clean. Watch name character rules and length limits. |
object service / object-group service
|
firewall service custom / group
|
Clean for TCP and UDP. Check ICMP type and code entries one by one. |
access-list + access-group β¦ in interface
|
Firewall policy (srcintf + dstintf) |
The ASA side has no destination interface. You have to derive it. See trap 1. |
| Auto NAT / twice NAT | Central SNAT + DNAT/VIP tables, or per-policy NAT | Pick the mode before you build anything. See trap 2. |
| Multiple context mode | VDOMs | NAT tables and policies are per VDOM, just as they were per context. |
| Failover pair | FGCP HA | Rebuilt, not converted. |
Trap 1 β the ASA never told you the egress interface
An ASA access-list bound with access-group OUTSIDE_IN in interface outside filters everything arriving on outside. The routing table decides where it leaves. The ACL does not care.
A FortiGate policy matches on a source interface and a destination interface. So for every ACE you have to answer a question the ASA config never answers: which interface does this destination route out of?
- Host or subnet destinations β do a route lookup on each one against the ASA routing table. Usually one answer.
-
Broad destinations β
any, or a group that spans several routes, can leave through more than one interface. Either list several interfaces in one policy, or split the ACE into one policy per egress interface. Splitting is easier to review later. -
Global ACLs (
access-group β¦ global) have no interface at all, so both sides must be derived. -
Outbound ACLs (
access-group β¦ out) are the mirror image: the egress is known, the ingress is not.
Do this before you write policies, while the ASA routing table is still the source of truth. If you guess the interface, the policy is correct on paper and never matches.
Trap 2 β choose the NAT mode first
FortiOS has two NAT models, and the choice changes what every inbound policy must reference:
| Inbound policy destination | |
|---|---|
| Cisco ASA (8.3 and later) | the real (internal) address |
| FortiGate, central NAT | the mapped (internal) address |
| FortiGate, per-policy NAT | the VIP object (public address) |
An ASA rulebase already uses real addresses, so with central NAT the ACL destinations carry over as they are. With per-policy NAT, every inbound policy has to be rewritten to point at a VIP. Central NAT also keeps NAT in its own ordered table, which is the shape ASA NAT already has.
The catch: FortiOS will not enable central NAT while any policy still references a VIP or an IP pool. Decide on an empty box, then build. The full detail, including the first-match ordering problem and the ICMP behaviour of explicit port mapping, is in the field note Central NAT on FortiGate.
Twice NAT has no single clean equivalent in either mode. Convert NAT last and check each twice-NAT statement by hand against the original.
Trap 3 β what the ASA allowed without a rule
On an ASA, traffic from a higher security level to a lower one is permitted with no ACL at all. same-security-traffic permit can open more. FortiOS has neither. Every flow needs a policy.
So a faithful translation of the ACLs can still break production. Before the change window, take a traffic sample from the live ASA (connection table, NetFlow, or syslog of permitted sessions) and replay it against the new policy set. Any flow the new policy denies was living on implicit permit. The ASA to Palo Alto page covers this reconciliation step in more detail. It is the same problem on a different target.
Trap 4 β the reverse-path check
By default, FortiOS checks the first packet of every new session: is the source reachable back through the interface it arrived on? Any route counts, not only the best one. An ASA does that only where ip verify reverse-path is configured.
Build the static routes before you test the policies. Otherwise sessions from networks the ASA reached through another interface can drop. The symptom looks like a policy problem, and it is not one.
Trap 5 β what does not convert at all
Plan hours for these regardless of tooling:
-
VPN β ASA crypto maps are policy-based. FortiGate VPNs are usually route-based (
phase1-interface/phase2-interface, plus routes and policies on the tunnel interface). Same intent, different construct. - Certificates β re-import or reissue. They do not travel with a config.
- Dynamic routing and HA β rebuilt by hand.
-
Inspection β ASA
policy-mapinspection does not map one-to-one onto FortiOS session helpers and protocol options. - Identity and remote access β AD integration and remote-access VPN are rebuilt on the FortiGate side.
The dangerous failure is not "this did not convert". It is "this did not convert and nobody was told". Keep an explicit list, with the source line each item came from.
A converter that runs on your machine
RuleForge parses an ASA show running-config into a vendor-neutral model and generates FortiOS CLI, using central NAT for the reason in trap 2. It runs offline as a single Go binary. Nothing is uploaded anywhere. A firewall configuration is the most sensitive text file in your estate. It has no business leaving your network, and that includes sending it to me.
- Analyze β full inventory of interfaces (including VLANs and port-channels), objects, rules, all four NAT shapes and routes. VPN, certificates, dynamic routing, HA and inspection features are captured with their source lines. They go to manual review instead of being dropped.
- Map β it proposes the interface and zone map. You edit and approve it. Conversion never runs on a map you have not seen.
- Convert β object names are preserved. Literals are wrapped in collision-safe helper objects. FortiOS naming rules are applied, and every rename is listed.
- Review β per-element outcomes and before/after counts. FortiOS output can be re-parsed, so the round-trip check compares what was generated against the model by count and by value.
Every job produces a Conversion Process Report: one row per element, with its outcome. See a real one from a sample job. That sample is ASA to PAN-OS, and the report format is the same for every direction.
What it does not do
- It does not know what the ASA permitted implicitly. Trap 3 is still yours, and it needs traffic data, not a config file.
- It does not rebuild VPN, certificates, routing or HA. It reports them.
- The free edition converts up to 150 rules per job and is single-tenant. Multi-context to VDOM conversion is in the paid edition.
- A converted config is the starting point for a change window. Do not paste it into production unreviewed. The same is true of every vendor tool.
Run it
Grab the tarball and SHA256SUMS from the releases page, then:
sha256sum -c SHA256SUMS
tar xzf ruleforge-free-*-linux-amd64.tar.gz
./ruleforge
# dashboard on http://127.0.0.1:8428
The same tool converts between any two of Cisco ASA, Cisco FTD, PAN-OS, FortiGate and Check Point. Going on from FortiGate later? See FortiGate to Palo Alto. Paid editions are on Whop. Licensing is offline Ed25519, and nothing phones home in either edition. Want the result reviewed before cut-over? See the Firewall Migration Config Review (fixed price, async).
Behaviour can change between ASA and FortiOS releases. Verify every point here in a lab on your target version before the change window. If your experience differs, open an issue.
Originally published at nizartuanku.github.io.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.