does suse 10.0 use a hosts file to block unwanted web sites like windows?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
SuSE 10.0 is very old...11.0 is the latest. The 'hosts' file is normally used for name resolution, in the event you want to specify a different address for a host, other than the one it gets from DNS (or to keep from using DNS totally...).
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.