---
title: "Delete a Rule"
slug: "delete-a-rule"
updated: 2024-09-02T09:57:50Z
published: 2024-09-02T09:57:50Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zpesystems.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a Rule

## Delete a Rule through CLI

1. Log in to the Nodegrid device CLI console with an **admin**account.
2. Navigate to the firewall **Chain**which contains the rule:

```plaintext
[admin@nodegrid /]# cd /settings/ipv4_firewall/chains/INPUT/
```
3. List all available rules with the **show**command.

```plaintext
[admin@nodegrid INPUT]# show
  rules  target  source net4     destination net4  protocol  input interface  output interface  packets  bytes
  =====  ======  ==============  ================  ========  ===============  ================  =======  =======
  0      ACCEPT  127.0.0.1                                                                      0        0
  1      ACCEPT  192.168.56.101                                                                 0        0
  2      ACCEPT  192.168.1.1                       tcp                                          104007   5150785
```
4. Type **delete**together with the rule number to delete a rule and to activate the change.

```plaintext
[admin@nodegrid INPUT]# delete 2
```

A list of currently active IPv4 rules can be see with the command **shell sudo /usr/sbin/iptables -L -nvx**

```plaintext
[admin@nodegrid /]# shell sudo /usr/sbin/iptables -L -nvx
Chain INPUT (policy ACCEPT 110 packets, 13509 bytes)
    pkts      bytes target     prot opt in     out     source               destination
    1182   132492 ACCEPT     all  --  *      *       127.0.0.1            0.0.0.0/0
       0        0 ACCEPT     all  --  *      *       192.168.56.101       0.0.0.0/0 

Chain FORWARD (policy DROP 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy DROP 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination
    1182   132492 ACCEPT     all  --  *      *       127.0.0.1            0.0.0.0/0
      59    32478 ACCEPT     all  --  *      *       192.168.56.101       0.0.0.0/0
```

A list of currently active IPv6 rules can be see with the command **shell sudo /usr/sbin/ip6tables -L -nvx**

```plaintext
[admin@nodegrid /]# shell sudo /usr/sbin/ip6tables -L -nvx
Chain INPUT (policy DROP 1 packets, 72 bytes)
    pkts      bytes target     prot opt in     out     source               destination
       2      132 ACCEPT     all      lo     *       ::/0                 ::/0
       0        0 ACCEPT     all      *      *       ::1                  ::/0

Chain FORWARD (policy DROP 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy DROP 8384 packets, 428444 bytes)
    pkts      bytes target     prot opt in     out     source               destination
       2      132 ACCEPT     all      *      *       ::1                  ::/0
```

## Delete a Rule through WebUI

1. Log in to the Nodegrid Manager Web UI with an admin account. ![](https://cdn.document360.io/763c5fb1-b9af-4ccd-9ad6-cf28ae4cd5a3/Images/Documentation/delete-a-rule-image-r0hgi1st.jpg)
2. Go to ***Security::Firewall.***
3. Click on the **Chain**which contains the rule to see a list of current rules. ![](https://cdn.document360.io/763c5fb1-b9af-4ccd-9ad6-cf28ae4cd5a3/Images/Documentation/delete-a-rule-image-gtlgj3fj.jpg)
4. Select the rule to be deleted.
5. Click **Delete.** The rule gets deleted and the change will be effective immediately

![](https://cdn.document360.io/763c5fb1-b9af-4ccd-9ad6-cf28ae4cd5a3/Images/Documentation/delete-a-rule-image-5w209gka.jpg)
