Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ 1 [2] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Blocking ips/hosts, The most simple ways?< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Feb. 26 2007,14:40 QUOTE

using firefox?
If so, install adblock or adblock plus. This is perhaps the most  vital firefox extension available. It's especially helpful due to its ability to use wildcards, so you can set a filter http://ads.* to block all subdomains named "ads", or */banners/* to block all content from any directory named "banners"

I've honestly never used the host access files in Linux, but it just seemed like it would be the easiest way to block a host from any access to your machine.  For banners in a web browser, however, I tend to just let the browser block them. This might have to change eventually, though. It seems the more time goes by, the tougher we need to get with security, privacy, and annoyances.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
humpty Offline





Group: Members
Posts: 655
Joined: Sep. 2005
Posted: Feb. 27 2007,03:11 QUOTE

>Anyway I ran rc.firewall and configured it, but I can still see those banners/ads.

Sometimes the ip address is not the same as the web IP address, e.g this-ad.com will be different from www.this-ad.com.

As a last resort you could try peerguard.dsl i submitted some time ago. (It requires iptables.dsl, and you will have to comment out PORTS_NOT_TO_BLOCK=80 from PG.conf)
Back to top
Profile PM 
Zucca Offline





Group: Members
Posts: 524
Joined: Feb. 2006
Posted: Feb. 28 2007,03:55 QUOTE

Quote (mikshaw @ Feb. 26 2007,11:40)
using firefox?
If so, install adblock or adblock plus.

No. I want it system wide.

--------------
Do you have it? - http://dy.fi/mak
Back to top
Profile PM WEB ICQ MSN 
Jason W Offline





Group: Members
Posts: 260
Joined: Nov. 2006
Posted: Mar. 05 2007,03:29 QUOTE

For me, the easiest way to block access to certain hosts is to modify the /etc/hosts file.  To block ads from, say, www.adserver.com just add this line to the /etc/hosts file:

127.0.0.1    www.adserver.com

Or if you want to block a certain smutserver, then add:

127.0.0.1   www.smutserver.com

You get the point.  This maps the address of the adserver or smutserver to your local loopback 127.0.0.1, and produces an instant "cannont find server" rather than taking you to their site, regardless of their IP or www address.
A good sample file is available online that blocks thousands of adware sites.  Go to:

http://hostsfile.mine.nu/

for an example hosts file that contains over 50.000 ad sites.   It works without delay on a router/server even with minimal resources, and does not slow down your browsing.  It in fact speeds it up by not displaying all those resource hogging ad graphics.  On a desktop pc I would add entries to the /etc/hosts file judiciously, though, since it slows down a desktop machine for some reason if the /etc/hosts file is big.  I use this procedure with my floppfw router and it works well at blocking most ads.
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Mar. 05 2007,15:42 QUOTE

keep in mind that if you happen to be running a webserver on your localhost, the 127.0.0.1 address is not the best choice. You'll probably want to change it to something that doesn't exist

--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
9 replies since Feb. 25 2007,12:03 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ 1 [2] >/
reply to topic new topic new poll
Quick Reply: Blocking ips/hosts

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code