LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   stopping pop-ups with iptables (https://www.linuxquestions.org/questions/linux-security-4/stopping-pop-ups-with-iptables-21736/)

fuxored 05-24-2002 11:58 AM

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.

geoffm33 05-24-2002 12:40 PM

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.

fuxored 05-24-2002 07:15 PM

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?

geoffm33 05-24-2002 10:54 PM

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.

Druaga 05-24-2002 10:57 PM

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.

Noerr 05-26-2002 05:37 AM

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 ... :)

qweqwe 06-16-2002 02:52 PM

for windows client machines inside ur network, u can panicware's popup stopper. its free and its very effective.

-qweqwe

ifm 06-17-2002 11:15 AM

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.

neo77777 06-17-2002 11:37 AM

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

Mara 06-18-2002 01:37 PM

You can note down IPs of servers pop-ups are from and blocka them. But there's a problem - you can block too much.

geoffm33 06-19-2002 05:59 AM

Quote:

You can note down IPs of servers pop-ups are from and blocka them
But I think the pop-up will still pop-up to a blocked page. The HTTP request would be blocked but the Javascript will still open the new window. Haven't tested though, just my guess.

Mara 06-19-2002 01:03 PM

But that's you can do using iptables...

koningshoed 06-19-2002 02:07 PM

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.

steppin_razor 06-27-2002 10:54 PM

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.