All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Opperisano <opie@817west.com>
To: netfilter@lists.netfilter.org
Cc: monkcucumber@yahoo.com
Subject: Re: Iptables Block Netbios Broadcasts UDP 137-138
Date: Tue, 23 Nov 2004 16:01:58 -0500	[thread overview]
Message-ID: <20041123210158.GA3214@bender.817west.com> (raw)
In-Reply-To: <20041123205139.64577.qmail@web54502.mail.yahoo.com>

On Tue, Nov 23, 2004 at 12:51:38PM -0800, Real Cucumber wrote:
> I cannot block LAN netbios broadcasts on a fedora core
> 2 Iptables box being used as an IDS.
> 
> It is therefore being 99% flooded with broadcasts.
> 
> I've tried:
> 
> iptables -A INPUT -p UDP --dport 137 -j DROP
> iptables -A INPUT -p UDP --dport 137 -s 0/0 -j DROP
> iptables -A INPUT -p UDP --dport 137 -s 192.168.0.0/24
> -j DROP
> 
> Nothing prevents them from getting through.
> 
> Is there anyway to do this?
> 
> If possible can someone email me direct at
> realcucumber@hotmail.com
> 
> Thanks for any help in advance.

i actually like using:

  iptables -I INPUT -m pkttype --pkt-type broadcast -j DROP

IDS software (like snort, for example) operates at the BPF layer, which
is below where netfilter hooks into the stack.

so it's unclear what your really asking--if your asking, "i installed
these iptables filter rules to block netbios, but my snort logs are still
full of netbios traffic" the answer is, no--netfilter can't stop that.
a BPF appended to the end of your snort command can filter them out
though:

  snort $SNORT_CMD_OPTS not udp port '(137 or 138)'

or, more generically:

  snort $SNORT_CMD_OPTS not dst host '(255.255.255.255 or 192.168.0.255)'

if instead--you are actually asking how to block these packets at layer
3--i would suppose you might have a rule before your rules above that
allow the packets.

-j

--
"Dear Baby, Welcome to Dumpsville. Population: You"
        --The Simpsons


  parent reply	other threads:[~2004-11-23 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-23 20:51 Iptables Block Netbios Broadcasts UDP 137-138 Real Cucumber
2004-11-23 20:58 ` Aleksandar Milivojevic
2004-11-23 21:01 ` Jason Opperisano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-11-23 21:50 Hudson Delbert J Contr 61 CS/SCBN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041123210158.GA3214@bender.817west.com \
    --to=opie@817west.com \
    --cc=monkcucumber@yahoo.com \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.