Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
Is there any program that would block bad domains for a linux ubuntu (lubuntu)? I mean something similar to spywareblaster on windows. Thanks and sorry for this.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
You could, perhaps, look into creating a hosts file to block such domains. This seems to be a fairly good explanation of the hosts file but I'm sure you could find better with a little research: http://www.bleepingcomputer.com/tuto...les-explained/
For web browsing thngs like NoScript and AdblockPlus go a long wAy towards removing unwanted content and Firefox and Chrome actually have built-in procedures to check domains against a list of known malicious domains held by Google which is somewhat controversial.
Thanks for the link! I downloaded the host file from here http://winhelp2002.mvps.org/hosts.htm and thought it would be as easy to use as replace the host file on /etc directory but that was not the case lol I tried to copy it there but it said permission denied... I think i need to use the "sudo" command to achieve that but i quess linux does not have similar copy command that windows has like copy hosts c:\windows... like i quess "sudo copy hosts /etc" or something like that lol dont work... Can someone tell me the correct command to replace the hosts file? Thanks you very much!
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
I would advise against simply replacing your existing hosts file as your host name or others you need may well be defined there. You could open the file with an editor like gedit by using something like:
Code:
gedit /etc/hosts
and when you're comfortable you know what any existing entries are you could add them to the top of the file you downloaded and copy it in place of your existing hosts file by doing the following:
Changing the file paths in the above to suit the name and location of the file you downloaded. I have just remembered though that Windows text files are of a slightly different format to Linux ones so you may have to use dos2unix on the file first to convert it.
I should also point out that it is a very good idea to read through the hosts file and understand all the entries in there as I have not personally read that hosts file so I can't confirm whether there are any mistakes, site you wouldn't want to block etc..
Yeah, right. If there's anything bloated and ineffective it's that hosts file. Deities know why people keep promoting it... Using /etc/hosts for redirecting lookups like that is a crude, past millennium way of dealing with things. To be more specific it won't help with or can't parse Javascript fun or do path-based filtering, update incrementally, block ad-tracking cookies, block in-page ads residing in a path on the same server you visit, block ads from a hostname of which the domainname is the same as the server you visit, block ads presented through Javascript or Flash, block ads by host or path substring match, block only web bugs, set session-only cookies for a range of sites, selectively block popups, refresh-tags and redirects, keep images with specific sizes from displaying or block visiting domains based on content. On top of that you'll have a hosts file filled with sites you might not even visit, no insight in how filters get added and nobody to vouch for its contents other than this one person.
For effective, usable and efficient distro and browser-agnostic filtering you can't beat a filtering proxy. Disagree? See if your hosts file can "protect" you against "modern" tricks (and I mean this decade, not the past millennium): https://www.linuxquestions.org/quest...9/#post3585760 (BTW don't need to look: it can't.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.