Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: dnat problem in transparent firewall
Date: Wed, 4 Aug 2004 12:30:03 +0100	[thread overview]
Message-ID: <200408041230.03828.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <200408041414.51486.raido@elin.ttu.ee>

On Wednesday 04 August 2004 12:14 pm, Raido Kurel wrote:

> > That's because the DNAT target does not return to the chain.   The LOG
> > target is almost the only target I can think of which *does* return back
> > to the chain for further processing - all other targets are the "final
> > outcome" for the packet.
> >
> > Put the two rules the other way round and you'll get both LOGging and
> > DNATting.
>
> Thanks, I have been missed that. Now I can ask my question in other words:
>
> I presume, that http://ebtables.sourceforge.net/br_fw_ia/PacketFlow.png is
> correct.
>
> According to this picture, my packets should flow in lowest path.
> To be sure it is so, I have made rules to log incoming packet in 3 points:
> a)iptables nat table prerouting chain
> b)ebtables filter table forward chain
> c)iptables mangle table forward chain
> d)ebtables filter table input chain
>
> I try to connect fron Internet to aaa.aaa.aaa.12
>
> In case of rule:
> iptables -t nat -A PREROUTING -d aaa.aaa.aaa.12 -j DNAT --to-dest
> aaa.aaa.aaa.13
>
> I see packet only in point a)
>
> In case of no rule or rule
> iptables -t nat -A PREROUTING -d aaa.aaa.aaa.12 -j DNAT --to-dest
> aaa.aaa.aaa.12
>
> I see packet in a), b) and c) points.
>
> I see also packet in a), b) and c) points if I connect from internet to
> aaa.aaa.aaa.13
>
> It's just like DNAT rule drops packet, but it can't be, because DNAT to the
> same address works fine. I know I have missed something important, but what
> could it be?

What do your LOGging rules say?   Is it possible that you are trying to LOG 
packets addressed to aaa.aaa.aaa.12, and therefore the rules no longer see 
the packets once the address has been changed to aaa.aaa.aaa.13?

Regards,

Antony.

-- 
I don't know, maybe if we all waited then cosmic rays would write all our 
software for us. Of course it might take a while.

 - Ron Minnich, Los Alamos National Laboratory

                                                     Please reply to the list;
                                                           please don't CC me.



  reply	other threads:[~2004-08-04 11:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-04  7:10 dnat problem in transparent firewall Raido Kurel
2004-08-04  8:45 ` Antony Stone
2004-08-04 11:14   ` Raido Kurel
2004-08-04 11:30     ` Antony Stone [this message]
2004-08-04 12:05       ` Raido Kurel
  -- strict thread matches above, loose matches on Subject: below --
2004-08-03 11:36 Raido Kurel
2004-08-03 12:33 ` Antony Stone

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=200408041230.03828.Antony@Soft-Solutions.co.uk \
    --to=antony@soft-solutions.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox