Skip to main content
janro
New Member
March 17, 2021
Question

What is the default value?

  • March 17, 2021
  • 2 replies
  • 5975 views

Hi!

I have FortiOS 6.4.5 installed.

How to know the default value of some variable (ie set snat-hairpin-traffic) while there is not this row in configuration?

2 replies

lobstercreed
New Member
March 21, 2021

The default value is indicated in the documentation you referenced (in your original post), but as a rule you can always do a "get" at a given config branch to see all the various values set.  For example, just like you can do "show system settings" or "config system settings" and then run "show", you can also run "get system settings" or "config system settings" and then "get".  I love the FortiGate CLI syntax once I got the hang of it.

janro
janroAuthor
New Member
March 22, 2021

Yes, there are subcommands (set,unset,show,get etc).

My misunderstanding is that as far as I have not set the variable (ie snat-hairpin-traffic) it is neither enabled nor disabled. get and show do not inform me about that. But what is the value that Fortigate uses?

lobstercreed
New Member
March 22, 2021

I'm not sure what you mean about "get" not informing you about that.  "Show" doesn't display anything if it is currently set to the default value, but "get" absolutely does.  I just verified this on my FW running the same code as you.  For me it's about the 10th value down (if you're not already using grep to filter your output).

commutator
New Member
March 23, 2021
You can use the command 'show full' to display all the settings including those set to the defaults. It works in context like 'show' so if you're editing one policy it'll show just that policy's settings. ...Fred