public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Tanstaafl <tanstaafl@libertytrek.org>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] iptables question...
Date: Fri, 16 Dec 2011 10:17:33 -0500	[thread overview]
Message-ID: <4EEB610D.9050309@libertytrek.org> (raw)

Hi all,

I was reading up on some iptables rules in the gentoo security handbook:

http://www.gentoo.org/doc/en/security/security-handbook.xml?part=1&chap=12&style=printable

It mentions DROPing packets with an INVALID state.

It sounded/sounds like a good idea, so I added the following rule:

-A INPUT -i eth0 -m state --state INVALID -j LOG

As suggested, I addd this rule just ABOVE this one:

-A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT

I also changed the DROP action to LOG so I could see what it did if 
anything.

Right after adding this rule, I started seeing lines like this in the log:

Dec 16 10:15:31 myhost kernel: IN=eth0 OUT= 
MAC=00:e0:81:54:9c:8a:00:90:7f:86:a8:c0:08:00 SRC=208.87.137.233 
DST=192.168.1.252 LEN=40 TOS=0x00 PREC=0x00 TTL=52 ID=0 DF PROTO=TCP 
SPT=50113 DPT=25 WINDOW=0 RES=0x00 RST URGP=0

What I don't understand is why it isn't using my LOG prefix that is used 
for everything else:

-A INPUT -j LOG --log-prefix "(>fw-drop): " --log-level 7

Anyone?



             reply	other threads:[~2011-12-16 15:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-16 15:17 Tanstaafl [this message]
2011-12-17 16:34 ` [gentoo-user] iptables question Hari Purnama
2011-12-17 17:25   ` Tanstaafl
  -- strict thread matches above, loose matches on Subject: below --
2007-01-31 20:36 [gentoo-user] IPtables question James Colby
2007-01-31 20:56 ` Albert Hopkins
2007-01-31 23:25   ` Mick
2007-02-01  3:58 ` Norberto Bensa
2007-02-02  8:45 ` Pawel Kraszewski
2007-02-02  9:54   ` Hans-Werner Hilse
2007-02-02 11:01     ` Pawel Kraszewski
2006-03-28 13:38 [gentoo-user] iptables question Hiren Dave
2006-03-28 14:06 ` Boyd Stephen Smith Jr.
2006-03-28 14:35 ` Uwe Thiem
2006-03-29  2:24 ` JimD
2006-01-20 19:49 Dmitry S. Makovey
2006-01-20 20:49 ` Trenton Adams
2006-01-20 22:21   ` Dmitry S. Makovey

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=4EEB610D.9050309@libertytrek.org \
    --to=tanstaafl@libertytrek.org \
    --cc=gentoo-user@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox