Linux Netfilter discussions
 help / color / mirror / Atom feed
* iptables help
@ 2004-07-28 23:20 Ashley M. Kirchner
  2004-07-29  6:32 ` Antony Stone
  0 siblings, 1 reply; 11+ messages in thread
From: Ashley M. Kirchner @ 2004-07-28 23:20 UTC (permalink / raw)
  To: netfilter


    I need some help adding a few blocking rules (*) to an iptables 
script that I once inherited, and grown over time.  I don't want to post 
the whole thing here because I don't need to be spamming everyone with 
it, but if there's a kind soul willing to help, I'll gladly send it 
(unless no one objects to getting the whole file.)

    (*) the basic gist is that I need to block places like hotmail.com, 
yahoo.com, and other sites from getting accessed from only two machines 
on our private network, during a specific period of time.  If we like 
the way it works, we'll add more machines/IPs to it later.




^ permalink raw reply	[flat|nested] 11+ messages in thread
* RE: Re: iptables help
@ 2004-07-29 21:41 Jason Opperisano
  2004-07-29 21:59 ` Ashley M. Kirchner
  0 siblings, 1 reply; 11+ messages in thread
From: Jason Opperisano @ 2004-07-29 21:41 UTC (permalink / raw)
  To: Ashley M. Kirchner, netfilter

>     Heh, I just realized this won't help a whole helluva lot because
> www.yahoo.com's round-robin setup isn't contiguous:
>
>     66.94.230.35
>              .39
>              .41
>              .45
>              .48
>              .49
>              .51
>              .52

$ i=35; while [ $i -le 52 ]; do echo -n "$i:"; lynx -dump 66.94.230.$i | head -3; let "i = $i + 1"; done

gives me nuthin' but "[1]Yahoo!"  so i'd say you're safe in blocking the range 66.94.230.35 - 66.94.230.52.

$ i=34; while [ $i -ge 1 ]; do echo -n "$i:"; lynx -dump 66.94.230.$i | head -3; let "i = $i - 1"; done

gives me Yahoo's down to .16 so i'd say you'd be safe blocking 66.94.230.16 - 66.94.230.52.

"-d 66.94.230.16/28" will block .16 - .31
"-d 66.94.230.32/28" will block .32 - .47
"-d 66.94.230.48/30" will block .48 - .51
"-d 66.94.230.52" will block .52

i'll leave hotmail as an excercise for the user...

someone already mentioned this--but this is *not* the "best" way to do this.  a transparent redirect to a squid server with a "dstdomain .yahoo.com" will block access to anything.yahoo.com regardless of IP address.

-j


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-07-29 21:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-28 23:20 iptables help Ashley M. Kirchner
2004-07-29  6:32 ` Antony Stone
2004-07-29 16:29   ` Ashley M. Kirchner
2004-07-29 18:28     ` Antony Stone
2004-07-29 21:07       ` Ashley M. Kirchner
2004-07-29 21:20         ` Antony Stone
2004-07-29 21:35           ` Ashley M. Kirchner
2004-07-29 21:18       ` Ashley M. Kirchner
2004-07-29 21:28         ` Antony Stone
  -- strict thread matches above, loose matches on Subject: below --
2004-07-29 21:41 Jason Opperisano
2004-07-29 21:59 ` Ashley M. Kirchner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox