I need to block all outgoing traffic to a domain with all its subdomains.
I tried to do something like this:
sudo ufw deny out from any to *.domain.com
but of course it doesn't work because it needs an IP number.
How can I do this?
I need to block all outgoing traffic to a domain with all its subdomains.
I tried to do something like this:
sudo ufw deny out from any to *.domain.com
but of course it doesn't work because it needs an IP number.
How can I do this?
You can do this more reliably with hosts.deny in just a few seconds:
hosts.deny as root:
sudo vi /etc/hosts.deny
ALL : .domain.com
The preceding dot in .domain.com is important. Do not forget it