stopping pop-ups with iptables
How would I go about about using iptables to block annoying pop-up ads? I've searched around, but haven't found much info regarding this. Maybe you guys can give me a nudge in the right direction. Thanx for any info.
|
I suppose if you wrote a rule or rules to deny outbound connections to known ad portals, then you might be successful.
Although, I think the pop-up window would still pop-up but the http request would be blocked. Just as annoying. Some web browsers have anti-pop-up settings. Opera, Galeon I know have this feature. |
Yeah I realize I can add a rule to deny each host as I find them, and have done this for several. It's a real pain to have to do add rules all the time though. Is there no way to tell iptables to only accept connections from the host you connected to?
|
As far as I know...you are dealing with javascript for pop-ups. Your browser is making a legitimate http request even though it is against the wishes of the user. iptables cannot determine the intent of the http request. I'm afraid there isn't anything that iptables can solve.
|
mozilla has an option to turn off unrequested pop-ups.
I use a proxy server that i got a script for which blocks hindreds of ads. |
There are apps (not sure if free) that can do just that. Go check tucows.com They can block adds, or pop-ups ..
(make sure you won't get bored afterwards, since it's good finger excercise to try to kill all pop-ups as soon as posible without closing useful windows. Kind the way like police training - hostage situations, shooting bad guys and save innocent ... :) |
for windows client machines inside ur network, u can panicware's popup stopper. its free and its very effective.
-qweqwe |
Or simply browse the web with javascript OFF.
Hehee ;) When I am faced with having to search the net for some information, or some site for something, and I am hitting sites I have never been too before... I shutoff all javascript before I go venturing. Once I am done, I turn it back on. As all my known websites that I frequent, and 'trust' do not have this bullsheet advertising technique. If I find a new site that I will attempt to trust/bookmark, I turn on javascript for that site and hit it. If its got popups out the wazzooo... I throw the site away never to return. But thats the way I use the web... just as example. |
I saw in one of the issues of Linux Journal a perl script to eliminate pop-ups, look through archives at http://www.linuxjournal.org
|
You can note down IPs of servers pop-ups are from and blocka them. But there's a problem - you can block too much.
|
Quote:
|
But that's you can do using iptables...
|
about the window still popping up, yes, it will. about iptables having too many denies/rejects, i don't know (I only have about 5 rules for my router). There is programs that around that can stop popups (PopupStopper for one), but I would wager that the best is to turn of javascript entirely - even though some sites is just not the same without it. But iptables, I personally feel that is not an effective way of doing it.
|
Wrong tool..
The only thing you can do is completely block hosts that do nothing but serve advertisements. However, this is a poor hack at best.
What you need is either: 1. Anti-advertising features built into your browser (i.e. Netscape will do popup removal) 2. A proxy server There are packages like WebWasher that will serve as an ad blocking proxy server. Or... you can set up apache as a proxy server and build an advertising blocking hook in. I started this as a project, but I'm not willing to share the source because I may choose to try and commercialize it one of these days... |
All times are GMT -5. The time now is 09:29 AM. |