0

I was wanting to block a list of specific hosts, specifically so my server has no access to them at all. I tried using host2ip and entering the result into IP tables , but the IPs don't seem to lead to the site and I can still access the domains clearly.

How can I block say, 'bad.example.com' like I can on Windows with the HOSTS file?

1 Answers1

2

I assume you're on some kind of *nix since you mention IPTables. You can use the /etc/hosts file in a similar fashion to the windows hosts file.

However, adding a proxy like squid is another option that may make managing block lists easier.

nedm
  • 5,610
  • 5
  • 30
  • 52