does suse 10.0 use a hosts file to block unwanted web sites like windows?
I want to add a hosts file in my suse 10.0 box. I installed a hosts file in winxp to block bad internet sites and want to do the same on my linux box. Also using firefox browser.
|
Quote:
If you want to block internet sites, squid and squid-guard can do it. |
Yes, you can do that thing where you make bad domains resolve to 127.0.0.1. Of course, this isn't technically "blocking". Like TB0ne one said, you can use a proxy server to do real blocking.
|
I use the hosts file to block some sites on my SuSE 10.0 box too.
The hosts file should be in the /etc folder and you have to be root to edit it. It works the same as the Windows one. |
ubuntu has hosts, hosts.deny, hosts.allow in the /etc directory.
|
Hello john test. :)
SuSE 10.0 has that too. I've just used the plain "hosts" one the same way I use it in Windows. |
Yes, I got it to work by appending the hosts file text to the hosts file. I leave the hosts.allow and hosts.deny alone. I found that the file does block pop ups.
|
You may cause problems if you cut and paste text from a windows text file. Make sure the line endings don't contain both newlines and returns.
They should just use newlines (\n). You can check it by loading it into vim or running "od -a /etc/hosts". You should see a "nl" character between lines. You can fix a text file running "sudo dos2unix /etc/hosts". Another thing you can do if you don't have very many IP addresses to block is to add iptables rules blocking ingress or outgress traffic from/to those addresses. |
All times are GMT -5. The time now is 12:39 PM. |