sudo ufw insert 1 deny from 216.21.13.0/24 to any port 80 And it will put it at the top of the list.

To deny the TCP port 389, run the following command: ufw deny 389/tcp. To deny the UDP port 137, run the following command: ufw deny 137/udp. To deny all connections from a specific IP (192.168.0.150), run the following command: ufw deny from 192.168.0.150. To deny a specific port range (8000:8200), run the following command: ufw deny 8000:8200/tcp ufw – Manage firewall with UFW — Ansible Documentation In these cases, use # reject instead of deny. In addition, log rejected connections:-ufw: rule: reject port: auth log: yes # ufw supports connection rate limiting, which is useful for protecting # against brute-force login attacks. ufw will deny connections if an IP # address has attempted to initiate 6 or more connections in the last # 30 seconds How to Set Up a Firewall with UFW on Debian 10 | Linuxize Apr 11, 2020 How to Use UFW Firewall on Debian, Ubuntu, Linux Mint

May 10, 2018

How To Setup a Firewall with UFW on an Ubuntu and Debian Jun 25, 2013 UFW List Rules – Linux Hint You can see the default in this case is to deny any incoming traffic (ingress), like listening for http traffic on port 8000. On the other hand, it allows outgoing traffic (egress) required, for example, to query the software repositories and update the packages as well as installing new packages.

Jan 24, 2020

How to Configure a Firewall with UFW | Linode