All of lore.kernel.org
 help / color / mirror / Atom feed
From: /dev/rob0 <rob0@gmx.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Enable Loopback confuse
Date: Fri, 19 Aug 2005 08:18:26 -0500	[thread overview]
Message-ID: <200508190818.26391.rob0@gmx.co.uk> (raw)
In-Reply-To: <BAY22-F13F52A0BB552F1A3EF3365A6B50@phx.gbl>

On Friday 2005-August-19 05:41, nattapon viroonsri wrote:
> When i enable loopback i just use 2 line below and everything work
> fine iptables -A INPUT -i lo -j ACCEPT
> iptables -A OUTPUT -o lo -j ACCEPT

Correct, unless earlier rules do something to prevent these rules from 
being evaluated.

> But i see many example around then have also included this line
>  below to enable loopback
> iptables -A FORWARD -o lo - j ACCEPT ?

They are wrong. FORWARD rules are checked when *both* the source and 
destination IP's are not local. Normal loopback traffic can never hit 
the FORWARD chain.

> So can i omit this line ?
> or what kind of packet that match this rule ?

Yes. None. It's possibly true that specially-crafted packets and silly 
routing could be employed, but this is not a real-world situation.

filter table            IP address
built-in chains         source          destination
----------------        ------          -----------
INPUT                   n/a             local
OUTPUT                  local           not local
FORWARD                 not local       not local

Each packet is checked against the rules in only one of the built-in 
chains, *except* loopback traffic, which hits OUTPUT going out, and 
then INPUT coming in.
-- 
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header


  reply	other threads:[~2005-08-19 13:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-19 10:41 Enable Loopback confuse nattapon viroonsri
2005-08-19 13:18 ` /dev/rob0 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-08-19 11:55 Joris Dobbelsteen
2005-08-20  8:30 Joris Dobbelsteen

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=200508190818.26391.rob0@gmx.co.uk \
    --to=rob0@gmx.co.uk \
    --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.