How to Block Ports in UFW Ubuntu Firewall
// To block the UDP port 4444, run the following command: $ sudo ufw deny 4444/udp // The same way, you can block the TCP and UDP port (let’s say 4514) at the same time with the following command: $ sudo ufw deny 4514 // Check status: $ sudo ufw status