Delete a Rule

Prev Next

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:

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

    [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.

    [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

[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

[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.

  2. Go to Security::Firewall.

  3. Click on the Chain which contains the rule to see a list of current rules.

  4. Select the rule to be deleted.

  5. Click Delete. The rule gets deleted and the change will be effective immediately