All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Blocking Netranges Based on IP-to-Country CSV
@ 2004-09-17 20:16 Hudson Delbert J Contr 61 CS/SCBN
  2004-09-20 11:57 ` Nick Drage
  0 siblings, 1 reply; 23+ messages in thread
From: Hudson Delbert J Contr 61 CS/SCBN @ 2004-09-17 20:16 UTC (permalink / raw)
  To: 'Netfilter Mailing List'


depends on what you call a 'legitimate' connection.
if the guy is browsing the web and comes upon say perhaps .....your website
why would he not be considered 'legitimate' because you dont like the
'reputation'...

####################################
# delbert.hudson@losangeles.af.mil #
#        61cs/scbn, 3-0182         #
####################################


-----Original Message-----
From: netfilter-bounces@lists.netfilter.org
[mailto:netfilter-bounces@lists.netfilter.org]On Behalf Of Nick Drage
Sent: Friday, September 17, 2004 4:46 AM
To: netfilter@lists.netfilter.org
Subject: Re: Blocking Netranges Based on IP-to-Country CSV


On Thu, Sep 16, 2004 at 09:33:03AM -0700, Hudson Delbert J Contr 61 CS/SCBN
wrote:
> 
> why do this ?

There's a good set of reasons on:

http://ip-to-country.webhosting.info/

> seems a bit nasty in nature.

Depends how you use the information.  And to be honest considering the
reputation of some sources of traffic, such as Korea and South America,
which might be unlikely to have legitimate connections to your site, it
would be handy to block them all.

> we dont even do this sort of thing? see email addy...

But you're a worldwide organisation, and I think there's much more that
you can do with this than just block.  For example, has anything figured
out a way to tie this into logging rules, it would great to see which
countries I'm being attacked from.

-- 
mors omnia vincit


^ permalink raw reply	[flat|nested] 23+ messages in thread
* Blocking Netranges Based on IP-to-Country CSV
@ 2004-09-20 13:57 nutbrownhares
  2004-09-20 14:09 ` Jason Opperisano
  2004-09-20 14:10 ` Alexis
  0 siblings, 2 replies; 23+ messages in thread
From: nutbrownhares @ 2004-09-20 13:57 UTC (permalink / raw)
  To: netfilter

With all due respect, I initially asked a technical question: given a data file, how does one block ranges from that file.  I didn't ask if people agreed or disagreed with why we want to do this.   The "why" isn't relevant to the discussion.  I'm also not interested in whether it is or is not 100% effective; I know it isn't.  It will still eliminate 95% of the traffic I want to stop.  So far I've seen a lot of political opinions.  Does anyone have a technical answer?




^ permalink raw reply	[flat|nested] 23+ messages in thread
* RE: Blocking Netranges Based on IP-to-Country CSV
@ 2004-09-16 16:33 Hudson Delbert J Contr 61 CS/SCBN
  2004-09-17 11:46 ` Nick Drage
  0 siblings, 1 reply; 23+ messages in thread
From: Hudson Delbert J Contr 61 CS/SCBN @ 2004-09-16 16:33 UTC (permalink / raw)
  To: 'McFall, Gary', 'netfilter@lists.netfilter.org'


	why do this ?

	seems a bit nasty in nature.

	we dont even do this sort of thing? see email addy...

~piranha

-----Original Message-----
From: netfilter-bounces@lists.netfilter.org
[mailto:netfilter-bounces@lists.netfilter.org]On Behalf Of McFall, Gary
Sent: Wednesday, September 15, 2004 5:58 AM
To: 'netfilter@lists.netfilter.org'
Subject: Blocking Netranges Based on IP-to-Country CSV


Due to a number of issues, my organization is looking at being able to block
certain country domains at the firewall.  To be proactive, we want to
automate that process via iptables & the CSV available at
<http://ip-to-country.webhosting.info <http://ip-to-country.webhosting.info>
>.

We have created a C program (IPCheck) in the /bin directory which, when
given an IP long number, checks the ip-to-country CSV and returns a value
for permit or not.  We want to process the packet based on that return.  

I'm a relative newbie with iptables & scripts.  Listed below is some very
crude code, some of which is a verbal description of intent.  Any
suggestions on how to shore this up so that it will work?  Or should this
concept be a new module in iptables?

#
#    ***** DROP BAD IPS *****
#
/bin/IPCheck `grep -w "SRC =" | cut -d = -f 2`
if return = "Bad IP"
$IPT -A INPUT -$ETH0 $RATELIMIT -j INBADIPS

      ***** RULES - DROP  BAD IPS *****
#    ***** REVIEW LOG AT /var/log/iptables.log *****
#
$IPT -A  INBADIPS -j LOG --log-level debug --log-prefix "BADIP:  " -j DROP

Thanks in advance for your help.

Gary McFall


^ permalink raw reply	[flat|nested] 23+ messages in thread
* Blocking Netranges Based on IP-to-Country CSV
@ 2004-09-15 23:41 Gary & Mic McFall
  2004-09-16  0:54 ` Frank Gruellich
  0 siblings, 1 reply; 23+ messages in thread
From: Gary & Mic McFall @ 2004-09-15 23:41 UTC (permalink / raw)
  To: netfilter

Due to a number of issues, my organization is reviewing the ability to
block certain country domains at the firewall.  To be proactive, we want
to automate that process via iptables & the CSV available at
<http://ip-to-country.webhosting.info>.

We have created a C program (IPCheck) in the /bin directory which, when
given an IP long number, checks the ip-to-country CSV and returns a
value for permit or not.  We want to process the packet based on that
return.  

I'm a relative newbie with iptables & scripts.  Listed below is some
very crude code, some of which is a verbal description of intent.  Any
suggestions on how to shore this up so that it will work?  Or should
this concept be a new module in iptables?

#
#    ***** DROP BAD IPS *****
#
/bin/IPCheck `grep -w "SRC =" | cut -d = -f 2`
if return = "Bad IP"
$IPT -A INPUT -$ETH0 $RATELIMIT -j INBADIPS

      ***** RULES - DROP  BAD IPS *****
#    ***** REVIEW LOG AT /var/log/iptables.log *****
#
$IPT -A  INBADIPS -j LOG --log-level debug --log-prefix "BADIP:  " -j
DROP

Thanks in advance for your help.

Gary McFall

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Blocking Netranges Based on IP-to-Country CSV
@ 2004-09-15 12:57 McFall, Gary
  2004-09-16 14:16 ` Aleksandar Milivojevic
  0 siblings, 1 reply; 23+ messages in thread
From: McFall, Gary @ 2004-09-15 12:57 UTC (permalink / raw)
  To: 'netfilter@lists.netfilter.org'

Due to a number of issues, my organization is looking at being able to block
certain country domains at the firewall.  To be proactive, we want to
automate that process via iptables & the CSV available at
<http://ip-to-country.webhosting.info <http://ip-to-country.webhosting.info>
>.

We have created a C program (IPCheck) in the /bin directory which, when
given an IP long number, checks the ip-to-country CSV and returns a value
for permit or not.  We want to process the packet based on that return.  

I'm a relative newbie with iptables & scripts.  Listed below is some very
crude code, some of which is a verbal description of intent.  Any
suggestions on how to shore this up so that it will work?  Or should this
concept be a new module in iptables?

#
#    ***** DROP BAD IPS *****
#
/bin/IPCheck `grep -w "SRC =" | cut -d = -f 2`
if return = "Bad IP"
$IPT -A INPUT -$ETH0 $RATELIMIT -j INBADIPS

      ***** RULES - DROP  BAD IPS *****
#    ***** REVIEW LOG AT /var/log/iptables.log *****
#
$IPT -A  INBADIPS -j LOG --log-level debug --log-prefix "BADIP:  " -j DROP

Thanks in advance for your help.

Gary McFall

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

end of thread, other threads:[~2004-09-20 14:10 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-17 20:16 Blocking Netranges Based on IP-to-Country CSV Hudson Delbert J Contr 61 CS/SCBN
2004-09-20 11:57 ` Nick Drage
  -- strict thread matches above, loose matches on Subject: below --
2004-09-20 13:57 nutbrownhares
2004-09-20 14:09 ` Jason Opperisano
2004-09-20 14:10 ` Alexis
2004-09-16 16:33 Hudson Delbert J Contr 61 CS/SCBN
2004-09-17 11:46 ` Nick Drage
2004-09-18 13:25   ` Pascal Vilarem
2004-09-19 11:09     ` Nick Drage
2004-09-19 14:59       ` Alexis
2004-09-19  9:09   ` Mohamed Eldesoky
2004-09-19 11:01     ` Nick Drage
2004-09-19 11:17       ` Mohamed Eldesoky
2004-09-19 11:45         ` George Alexandru Dragoi
2004-09-20 11:53           ` Nick Drage
2004-09-20 12:06             ` Thomas Lußnig
2004-09-20 12:26               ` Chris Brenton
2004-09-20 13:20                 ` George Alexandru Dragoi
2004-09-20 12:16             ` Chris Brenton
2004-09-15 23:41 Gary & Mic McFall
2004-09-16  0:54 ` Frank Gruellich
2004-09-15 12:57 McFall, Gary
2004-09-16 14:16 ` Aleksandar Milivojevic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.