Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Jason Opperisano <opie@817west.com>
To: netfilter@lists.netfilter.org
Subject: Re: Cleanest way to deal with loopback interface?
Date: Wed, 13 Apr 2005 17:13:49 -0400	[thread overview]
Message-ID: <20050413211349.GA31336@bender.817west.com> (raw)
In-Reply-To: <1113425449.3544.177.camel@seberino.spawar.navy.mil>

On Wed, Apr 13, 2005 at 01:50:50PM -0700, Christian Seberino wrote:
> I want first rules that packets encounter to be my DROP_CHAIN
> that weeds out suspicious packets including packets addressed
> to and from 127.0.0.1 (loopback):
> 
> # -------------------------------------------------------------
> $IPTABLES -t filter -P INPUT   DROP
> $IPTABLES -t filter -P OUTPUT  DROP
> $IPTABLES -t filter -P FORWARD DROP
>  
> $IPTABLES -t filter -A INPUT   -j DROP_CHAIN
> $IPTABLES -t filter -A OUTPUT  -j DROP_CHAIN
> $IPTABLES -t filter -A FORWARD -j DROP_CHAIN
>   
> $IPTABLES -t filter -A INPUT  -i $LOOPBACK_INTERFACE -j ACCEPT
> $IPTABLES -t filter -A OUTPUT -o $LOOPBACK_INTERFACE -j ACCEPT
> # ------------------------------------------------------------
> 
> How can I make DROP_CHAIN drop bogus 127.0.0.1 addressed packets
> but still allow **legitimate** loopback traffic?

allow traffic on the loopback interface unconditionally,  and allow the
linux routing code 'martian' checks to drop 127.0.0.0/8 packets received
'on the wire' as it does by default.

-j

--
"Auctioner: Our first item is a pair of panties confiscated from
 a prostitute.
 Quagmire: Fifty bucks.
 Auctioner: She had nine STDs.
 Quagmire: Forty-five bucks.
 Auctioner: And when we caught her she wet herself.
 Quagmire: Fifty bucks."
        --Family Guy


  parent reply	other threads:[~2005-04-13 21:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-13 20:50 Cleanest way to deal with loopback interface? Christian Seberino
2005-04-13 21:00 ` Alexander Samad
2005-04-13 21:13 ` Jason Opperisano [this message]
2005-04-13 23:57   ` Christian Seberino
2005-04-14  1:35     ` Jason Opperisano
2005-04-14  1:32       ` Taylor Grant
2005-04-14  2:43         ` Jason Opperisano
2005-04-14  1:09   ` Taylor Grant
2005-04-17 23:27     ` seberino
2005-04-18  0:04       ` Thomas Jones
2005-04-18 20:02         ` Christian Seberino
2005-04-18 20:05           ` Taylor, Grant
2005-04-18 21:16           ` Thomas Jones
2005-04-18 20:09     ` Christian Seberino
2005-04-18 20:42       ` Taylor, Grant
2005-04-14  1:23 ` Taylor Grant

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=20050413211349.GA31336@bender.817west.com \
    --to=opie@817west.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox