Digital Marketing

How to List and Delete UFW #Firewall Ports/Rules

goyun@u:~$ sudo ufw status numbered
Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 22/tcp                     ALLOW IN    Anywhere
[ 2] 443/tcp                    ALLOW IN    172.16.0.0/12
[ 3] 3389                       ALLOW IN    192.168.0.0/23
[ 4] 3389                       ALLOW IN    172.16.0.0/24
[ 5] 110                        ALLOW IN    Anywhere
[ 6] 22/tcp (v6)                ALLOW IN    Anywhere (v6)
[ 7] 110 (v6)                   ALLOW IN    Anywhere (v6)

goyun@u:~$ sudo ufw delete 3
Deleting:
 allow from 192.168.0.0/23 to any port 3389
Proceed with operation (y|n)? y
Rule deleted
goyun@u:~$ sudo ufw status numbered
Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 22/tcp                     ALLOW IN    Anywhere
[ 2] 443/tcp                    ALLOW IN    172.16.0.0/12
[ 3] 3389                       ALLOW IN    172.16.0.0/24
[ 4] 110                        ALLOW IN    Anywhere
[ 5] 22/tcp (v6)                ALLOW IN    Anywhere (v6)
[ 6] 110 (v6)                   ALLOW IN    Anywhere (v6)

goyun@u:~$ sudo ufw delete 4
Deleting:
 allow 110
Proceed with operation (y|n)? y
Rule deleted

Comments

Popular posts from this blog

Make online money from the Internet