Jan 19, 2018

UFW delete firewall rule by number

The numbers of your firewall rules can listed using:

$ sudo ufw status numbered
Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 22/tcp                     ALLOW IN    Anywhere                  
[ 2] 22                         ALLOW IN    10.100.0.0/16             

[ 3] 22/tcp (v6)                ALLOW IN    Anywhere (v6)  


Use this syntax:

sudo ufw delete ####
sudo ufw reload
sudo ufw status

where #### is the number of your firewall rule.



Post a Comment

Featured Post

Setup Chinese Input Method in Ubuntu 17.10 Artful

sudo apt install ibus-sunpinyin After either of those commands do not forget to restart the IBus daemon ibus restart You might need t...