UFW – Using UFW to Block Outgoing Traffic to Website

firewallufw

I want to block traffic to a specific domain e.g. mysite.com. I tried blocking the ip address of the site but it does not work:

ufw deny from 0.0.0.0 to ip_address_of_site

I am still able to acess the website, even after a reboot.

Any idea what I might be doing wrong?

Best Answer

It will be:

sudo ufw deny out from any to _ipaddress_
Related Question