How to enable or disable a NAT policy from the Command Line Interface (CLI)

Description

How to enable or disable a NAT policy from the Command Line Interface (CLI)

Resolution for SonicOS 7.X

This release includes significant user interface changes and many new features that are different from the SonicOS 6.5 and earlier firmware. The below resolution is for customers using SonicOS 7.X firmware.

For this example, A Nat Policy for a FTP server will be used as shown in the screenshot below.


Image


Also, verify on the SonicWall Network | Interface page that SSH is enable for the WAN interface; click the configure button to see the Interface configuration page as shown below.


Image



To connect to the SonicWall’s CLI, connect the console cable to SonicWall and a PC.

Open a Terminal Emulation Software like HyperTerminal or Putty.

Configure the following parameters to login to the SonicWall CLI:

o    Bit per second: 115200

o    Data bits: 8

o    Parity: None

o    Stop bits: 1

o    Flow control: None

On the CLI page, login to the SonicWall.

Image


To Disable the Nat Policy, Enter the following commands:

·         Configure

·         Nat

·         Show nat                             (to see policies and get number for the policy to disable/enable)

Image


·         Modify  #                             (to modify policy 14 enter  “modify 14”)

Just enabling or disabling the nat policy will not work, you have to make a change to it and then enable or disable it. For Example change the inbound-interface. 

·         Inbound-interface  any

·         No Enable                           disables NAT Policy

·         End                                     saves the changes and exits.

·         Show nat                             verifies policy is disabled

Image

To Enable the Nat Policy, edit the inbound-interface and then use the enable command.

·         Inbound-interface  “X1”

·         Enable                                                   To re-enable NAT

·      End

Image


Resolution for SonicOS 6.5

This release includes significant user interface changes and many new features that are different from the SonicOS 6.2 and earlier firmware. The below resolution is for customers using SonicOS 6.5 firmware.


For this example, A Nat Policy for a FTP server will be used as shown in the screenshot below.

 Image
Also, verify on the SonicWall Network | Interface page that SSH is enable for the WAN interface; click the configure button to see the Interface configuration page as shown below.
Image

To connect to the SonicWall’s CLI, connect the console cable to SonicWall and a PC.

Open a Terminal Emulation Software like HyperTerminal or Putty.

Configure the following parameters to login to the SonicWall CLI:

o    Bit per second: 115200

o    Data bits: 8

o    Parity: None

o    Stop bits: 1

o    Flow control: None

On the CLI page, login to the SonicWall.

Image

To Disable the Nat Policy, Enter the following commands:

·         Configure

·         Nat

·         Show nat                             (to see policies and get number for the policy to disable/enable)

 Image 

·         Modify  #                             (to modify policy 14 enter  “modify 14”)

Just enabling or disabling the nat policy will not work, you have to make a change to it and then enable or disable it. For Example change the inbound-interface. 

·         Inbound-interface  any

·         No Enable                           disables NAT Policy

·         End                                     saves the changes and exits.

·         Show nat                             verifies policy is disabled

Image

To Enable the Nat Policy, edit the inbound-interface and then use the enable command.

·         Inbound-interface  “X1”

·         Enable                                                   To re-enable NAT

·      End

 Image

Related Articles

  • SonicOS 8.1.0 FAQ
    Read More
  • SonicWall GEN8 TZs and GEN8 NSas Settings Migration
    Read More
  • Getting started with SonicWall firewalls
    Read More
not finding your answers?