How to disable an access rule via CLI
03/26/2020 13 12024
This article applies to the scenario where the user accidently adds an incorrect access rule and loses access to SonicWall management via HTTP/HTTPS.
In this case we can access SonicWall via console or SSH(if SSH is enabled on the interface) and disable the incorrect access rule.
Step 1: Accessing SonicWall Via console/SSH
- Accessing SonicWall via Console
- Accessing SonicWall via SSH
-Launch your SSH client(ex:-Putty, securecrt, teraterm)
-Configure the client to connect to either to the internal or external IP address of the appliance.
-Click the connect (or equivalent) button
-Enter the username and password.
Step 2: Identifying the access rule ID
In order to edit/disable the access rule we will have to identify the ID for that incorrectly configured access rule.
-Enter configure terminal, by executing the command “configure”.
-Run the following command to view the custom access rules from and to a particular zone.
“show access-rules from LAN to LAN custom”
-identify the access rule ID, in this case the ID is ‘0’.
Step 3: Disabling the access rule
-Edit the access rule with the following command- “access-rule id 0”
(Here 0 is the access rule ID that was identified earlier).
-Disable the rule by executing the command “no enable”.
Step 4: Saving the configuration.
-Execute the “commit” command to save the configuration.