Linux - Security This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-28-2005, 08:48 AM
|
#1
|
|
Senior Member
Registered: Jan 2003
Location: Malaysia
Distribution: Fedora Core, Slackware, Mac OS X, Debian, OpenSUSE
Posts: 1,210
Rep:
|
firewall for privacy
Hi!
I would like to setup iptables to block IP net blocks belonging to advertising firms. Now I need some info of what kind of block should I use? Should I just DROP? or use REJECT? Or DROP if traffic is from advert firms IPs and REJECT if heading to adver firms IP.
How would this effect web browsing? Would I be bombarded with error messages instead of adverts?
Will there be an advantage if I use host.deny?
There is this article http://www.ecst.csuchico.edu/~atman/spam/adblock.shtml who redirect advert server address to local host add (127.0.0.1) using /etc/hosts. But if I want to protect multiple machine (different OSes) would be kinda multiple work for me.
Thanks in advance.
Last edited by carboncopy; 01-28-2005 at 08:52 AM.
|
|
|
|
01-28-2005, 09:13 AM
|
#2
|
|
Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
i suggest you DON'T try and do this using iptables... have you looked into using a filter??
i think you might like privoxy:
http://www.privoxy.org/
Last edited by win32sux; 01-28-2005 at 09:18 AM.
|
|
|
|
01-28-2005, 10:37 AM
|
#3
|
|
Senior Member
Registered: Jan 2003
Location: Malaysia
Distribution: Fedora Core, Slackware, Mac OS X, Debian, OpenSUSE
Posts: 1,210
Original Poster
Rep:
|
Am not a fan of using proxy
Anybody, with experience on this?
|
|
|
|
01-28-2005, 10:51 AM
|
#4
|
|
Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
well if you really wanna do it with iptables you could simply create a reference in your iptables script to a text file containing the IP netblocks you wanna filter... or you could manually put them in your script... none of these methods will be very effective, though...
wheather you use DROP or REJECT is really up to you, the site will be blocked either way... except of course with REJECT a reply will be sent to the host initiating the request...
you need to be very careful should you choose to do this filtering with iptables: the ad server netblocks will vary, and also there might be non-ad servers in a netblock you filter...
content filtering is the best way to block ads, IMHO... but you don't like proxies, and it seems like you like the idea of making your own blacklists, so maybe the /etc/hosts thing is the best option for you: yes, you can do DNS blocking for the whole network using the /etc/hosts file on your gateway if you want... just use a daemon like dnsmasq which will look at /etc/hosts, then do the usual 127.0.0.1 (or whatever IP you want) routine... it's very easy...
hosts on the lan making a dns request to the dns daemon for an ad host will be fed 127.0.0.1 (or whatever) as the address, so it'll be like doing the /etc/hosts thing on every machine, except you only have to do it on one... this way has the benefit that you won't need to touch iptables and the ad sites will be blocked even if the IPs change...
good luck...
Last edited by win32sux; 01-28-2005 at 11:37 AM.
|
|
|
|
01-28-2005, 12:37 PM
|
#5
|
|
Member
Registered: Feb 2003
Location: Jersey shore,north
Distribution: Siduction the only way to do Debian Sid!
Posts: 500
Rep:
|
Easier to use adblock in firefox.Some ad agencies use outside datacenters to host servers....same ipblock as say maybe a legit site.Blocking a whole block is asking for trouble.
I do use some block lists but......i dont update them anymore....soon id have to block the entire internet
just my 2cents
|
|
|
|
01-28-2005, 12:39 PM
|
#6
|
|
Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
Quote:
Originally posted by ironwalker
Easier to use adblock in firefox.
|
not when you have TONS of computers on a LAN...
=)
|
|
|
|
01-28-2005, 08:44 PM
|
#7
|
|
Senior Member
Registered: Jan 2003
Location: Malaysia
Distribution: Fedora Core, Slackware, Mac OS X, Debian, OpenSUSE
Posts: 1,210
Original Poster
Rep:
|
Adblock in firefox don't block cookies. I know I can specify which domain or IP to block them. It is really too much hassle EVEN on ONE machine. And, it doesn't solve the problem once users use other browsers such as Mozilla, Safari, "you must be nuts to use IE", Opera, etc.
Over the night sleep, pivoxy suggested by win32sux seems more attractive now. Will give it a try, so don't accuse me of not trying and be bias. 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:24 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|