From: Mart Frauenlob <mart.frauenlob@chello.at>
To: netfilter@vger.kernel.org
Cc: rcblach@gmail.com
Subject: Re: propper logging and dropping
Date: Fri, 16 Oct 2009 09:33:15 +0200 [thread overview]
Message-ID: <4AD821BB.6060205@chello.at> (raw)
In-Reply-To: <4AD7E857.6020100@gmail.com>
netfilter-owner@vger.kernel.org wrote:
> Good evening,
>
> I currently have the following macro.
>
> /sbin/iptables -N LOGDROP
> /sbin/iptables -A LOGDROP -i wlan0 ! -s 10.0.0.2 -j LOG --log-level
> info
> /sbin/iptables -A LOGDROP -j DROP
> /sbin/iptables -A INPUT -i wlan0 -s 58.102.198.29/255.255.255.0 -j
> LOGDROP
>
> What I really wan to do is log address and excluding certain subnets,
> and address, but drop others on offending networks.
> So I want to log addresses to wlan0 whose source address is not
> 10.0.0.2, but drop subnets which I exclude.
>
> What is the best way to do this
>
> Thanks
>
> Chip
>
If I get your question right:
$IPT -N LOGDROP
$IPT -A LOGDROP -s 10.0.0.2 -j RETURN
$IPT -A LOGDROP -j LOG --log-level INFO
$IPT -A LOGDROP -j DROP
$IPT -A INPUT -i wlan0 -s 10.0.0.0/24 -j LOGDROP
$IPT -A INPUT -i wlan0 -s 58.102.198.29/24 -j LOGDROP
...
Regards
Mart
next prev parent reply other threads:[~2009-10-16 7:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 3:28 propper logging and dropping Ralph Blach
2009-10-16 7:33 ` Mart Frauenlob [this message]
2009-10-16 14:36 ` Ralph Blach
2009-10-16 16:18 ` Ralph Blach
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=4AD821BB.6060205@chello.at \
--to=mart.frauenlob@chello.at \
--cc=netfilter@vger.kernel.org \
--cc=rcblach@gmail.com \
/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.