how to blacklist host?

Hi! I need to blacklist any incoming/outgoing connections to Google. I need to add filter something like this: google

In what context just a browser connection or a google bot indexing a website?

To block a browser etc, just add it to the /etc/hosts loopback eg

For a webste you add robots.txt see here;
The Web Robots Pages

Not only for browser. I want for example ping * to fail and to get an answer NO SUCH HOST, but not to regirect my own pc. For example, how does /etc/hosts.deny work??? I want all connections to/from google to be blocked, no matter on what protocol it works.

Or is there any good firewall with abbility to block hosts? In YaST there is some firewall, but it’s a total mess, it filters only ports.

It’s just a fronted for iptables. I think You should be able to do what You need configuring iptables manually.

Best regards,

Aren’t you trying the wrong thing? When you want to block users using hosts in the domain you should not block someone using the names, but the IP addresses. When I do

henk@boven:~> host is an alias for has address has address has address has IPv6 address 2a00:1450:8001::68

What I assume you want is blocking access to all the IP addresses there because the user can allways use the IP addresses in e.g. his browser without ever mentioning the word google.

A small suggestion,
Your question infers (but isn’t necessarily so) that you’re looking for a networking solution that can be applied to more than one host on your network, not just one single machine.

If this is so, then I recommend you look at various proxy server solutions which apply policy on your network’s Internet Gateway rather than on each and every Host. Practically any proxy server likely will do what you ask and much more.