Delete a Rule through CLI
- Log in to the Nodegrid device CLI console with an admin account. 
- Navigate to the firewall Chain which contains the rule: - [admin@nodegrid /]# cd /settings/ipv4_firewall/chains/INPUT/
- 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
- 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/0A 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                  ::/0Delete a Rule through WebUI
- Log in to the Nodegrid Manager Web UI with an admin account.   
- Go to Security::Firewall. 
- Click on the Chain which contains the rule to see a list of current rules.   
- Select the rule to be deleted. 
- Click Delete. The rule gets deleted and the change will be effective immediately 
