Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
ZiPPy
New Contributor

Enable NAT from console

In troubleshooting an issue, the operation mode was changed from NAT to Transparent. I' m having trouble trying to set it back to NAT via the CLI. Per the manual: config vdom edit vdomain3 config system settings set opmode nat end config system interface edit port1 set ip 192.168.10.100 255.255.255.0 end But this isn' t working, I don' t even see a vdom option, so I assume its deeper within the config.
13 REPLIES 13
ZiPPy
New Contributor

I believe this is the correct configuration: config system settings set opmode nat set manageip 192.168.1.1 255.255.255.0 But I can' t seem to get this config to take. From my understanding, you have to configure the manageip too, but that' s what' s not taking. I get a command parse error before ' manageip' Command fail. Return code -6
ede_pfau
SuperUser
SuperUser

Attention here! a) in your first post you change the opmode of a VDOM " vdomain3" . Be absolutely sure that you are working on a VDOM other than " root" if you do this - otherwise you could lose connection to your hardware. b) the sequence of commands matters here. The manual says
Set the IP address and netmask of the Transparent mode management interface. You must set this when you change opmode from nat to transparent. This option not available in transparent mode.
which is interpreted like this: - first you change the opmode " set opmode transparent" - then, before hitting " end" , you set the management IP " set manageip 1.2.3.4" - then you enter " end" which carries out the changes So strictly speaking " set manageip" is only available in TRANSPARENT mode, or rather " after you' ve entered ' set opmode transparent' " .
Ede Kernel panic: Aiee, killing interrupt handler!
Ede Kernel panic: Aiee, killing interrupt handler!
ZiPPy
New Contributor

That was actually an example from the manual, which is a bad one in reference to my issue. I' m not running in a VDOM. So do I need to do something different being that I' m not in a VDOM. Nothing seems to take when I try to configure the opmode.
ede_pfau
SuperUser
SuperUser

If you are in transparent mode, you actually have the ' manageip' option. If you change to NAT mode, you don' t have the ManageIP anymore - every interface now has an IP address. So the steps to take are:
 config system settings
    set opmode nat
    unset manageip
 end
 config system interface
    edit port1
    set ip 192.168.10.100 255.255.255.0
 end
But I would expect that you lose contact to the FGT after typing the first ' end' . You better connect via serial console if you do this.
Ede Kernel panic: Aiee, killing interrupt handler!
Ede Kernel panic: Aiee, killing interrupt handler!
ZiPPy
New Contributor

Thanks for throwing up the config, but I still can' t get it to take. I run: config system settings set opmode nat unset manageip *it spits out an error here Error: command parse error before ' manageip' Command fail. Return code -61 I' m thinking because not management IP was set( I never set one up that I know of) it won' t take this command.
ZiPPy
New Contributor

This problem is starting to look like a factoryreset is needed :(
rwpatterson
Valued Contributor III

What do you see when:
 config system settings 
 show
 

Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com

Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
ZiPPy
New Contributor

When I run a sh command, I get the following: config system settings end So it looks like I have nothing configured. Right?
rwpatterson
Valued Contributor III

You have the defaults. try:
 config system settings 
     set opmode nat 
  end

Bob - self proclaimed posting junkie!
See my Fortigate related scripts at: http://fortigate.camerabob.com

Bob - self proclaimed posting junkie!See my Fortigate related scripts at: http://fortigate.camerabob.com
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors