All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Schaaf <bof@bof.de>
To: Patrick Petermair <captain.nuke@gmx.at>
Cc: netfilter@lists.samba.org
Subject: Re: Rule question
Date: Sat, 22 Jun 2002 09:46:08 +0200	[thread overview]
Message-ID: <20020622094607.H5183@oknodo.bof.de> (raw)
In-Reply-To: <200206220935.12908.captain.nuke@gmx.at>; from captain.nuke@gmx.at on Sat, Jun 22, 2002 at 09:35:12AM +0200

> So far I think I understand everything except this line:
> $IPTABLES -A OUTPUT -o $INTIF -s $EXTIP -d $INTNET -j ACCEPT
> 
> How can an OUTPUT of the internal interface have the external IP address as 
> source IP ?? And why would it be accepted?

OUTPUT is for packets from local processes on the firewall machine,
which are going out to one or the other network interface. If you have
a userlevel process bind()ing the external IP of your firewall, and it
happens to connect() to a machine on the internal network, that rule
makes it work. If you do not want that, do not use that rule.

> As far as I understand it, the masquerading and stuff is all done in the 
> FORWARD chain.

Wrong. masquerading and all kind of NAT is done in one or the other
chain of the NAT table.

In the FORWARD chain, you just police the _results_ of the NAT action.
NAT itself is in the NAT table.

> I can't think of an example where a packet originating from 
> the internal interface of my firewall can have the external IP as source.

Be careful with your imagination: it becomes larger every year.

best regards
  Patrick


  parent reply	other threads:[~2002-06-22  7:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-22  7:35 Rule question Patrick Petermair
2002-06-22  7:38 ` Antony Stone
2002-06-22  7:46 ` Patrick Schaaf [this message]
2002-06-22  7:53   ` Antony Stone
2002-06-22  8:08     ` Patrick Schaaf
2002-06-22  8:17       ` Patrick Schaaf
2002-06-22  7:55   ` Patrick Schaaf
2002-06-22  7:46 ` Antony Stone
2002-06-26 14:57   ` Joe Patterson

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=20020622094607.H5183@oknodo.bof.de \
    --to=bof@bof.de \
    --cc=captain.nuke@gmx.at \
    --cc=netfilter@lists.samba.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.