Skip to main content
Jamshaid
Explorer
May 31, 2023
Question

Converting ASA static NAT to Fortinet

  • May 31, 2023
  • 10 replies
  • 5674 views

Hi 

 

I have an example statement 

nat (inside,outside) source static obj-192.168.1.1 obj- 78.5.6.7

 

As per my understanding, this will work both ways in ASA, means either 78.5.6.7 is the originator or 192.168.1.1, this rule will work for both in ASA ( correct me if I am wrong here )

 

So if my understanding is right, how can we achieve the same in fortinet? Does fortinet also works the same way i.e one static 1-1 rule will cover both directions or we have to configure one SNAT and a corresponding DNAT for this to work.

 

 

 

10 replies

scan888
New Member
May 31, 2023

Hi

ASA time is a long time ago.
I understand your rule as follow:
if traffic forward from inside to outside interface with destination IP 78.5.6.7, the source IP are changing to 192.168.1.1

(But my I'm also wrong ;))

 

To achive this on Fortinet do the following:

1. Create an "Adress Pool" object (pool: 192.168.1.1 - 192.168.1.1)

2. Create a matching firewall policy (source: your Server IP, destination: 78.5.6.7, service: what do you need)

2a: activate NAT on the firewall policy and select your created "pool".

 

That's it, more or less. ;)

jintrah_FTNT
Staff
Staff
May 31, 2023

Hi,

 

One VIP statement should help cover 1-1 nat,

 

config firewall vip
    edit "Test"
        set extip 192.168.1.1 
        set mappedip 78.5.6.7 
        set extintf "any"
    next
end  

 

Best regards,

Jin

Jamshaid
JamshaidAuthor
Explorer
May 31, 2023

This will provide bidirectional 1-1 NAT ?

Toshi_Esumi
SuperUser
SuperUser
May 31, 2023

You still need to configure another policy for out-to-in direction and put the VIP "Test" in the destination address. In other words, you need to a pair of policies, one for SNAT in in-to-out direction and another for VIP in out-to-in direction because PIX/ASA's NAT is bidirectional by default if you don't specify "unidirectional".

 

Toshi

Jamshaid
JamshaidAuthor
Explorer
May 31, 2023

Just to add one more thing, the firewall is in policy based mode with central NAT enabled ( I don't know if this makes a difference or not but just sharing to avoid any confusion )

 

P.S when we say asa is bidirectional, it means 1-1 nat will work both ways no matter the originator ( as per my initial question )

srajeswaran
Staff
Staff
May 31, 2023

hi @Jamshaid

Yes, the static VIP with 1-1 mapping will work both ways (similar to the ASA behavior).

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!