Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@vger.kernel.org
Subject: Re: Forwarding packets over the same LAN
Date: Tue, 14 Jul 2009 17:33:14 +0200	[thread overview]
Message-ID: <4A5CA53A.40703@plouf.fr.eu.org> (raw)
In-Reply-To: <1247558286.7214.16.camel@TestField.intranet.bem.md>

Hello,

Simion Onea a écrit :
> 
> I tried these rules but it seems that packets to not pass the first
> rule. To test this I put two LOG targets before and after the PREROUTING
> rule like this:
> 
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 10025 -j LOG
> --log-tcp-options --log-prefix PREROUTING_before:
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 10025 -j DNAT
> --to-destination 172.20.1.254:25
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25 -j LOG
> --log-tcp-options --log-prefix PREROUTING_after:
> iptables -t nat -A POSTROUTING -o eth0 -p tcp -d 172.20.1.254 --dport 25
> -j SNAT --to-source 172.20.1.245
> 
> As a result I received in the log three messages with
> "PREROUTING_before" -- these were SYN packets. And no message with
> "PREROUTING_after" :-(
> 
> What could be wrong ?

man iptables
DNAT is a terminal target, so after a match the next rules in the chain 
are not examined.



  parent reply	other threads:[~2009-07-14 15:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 14:00 Forwarding packets over the same LAN Simion Onea
2009-07-13 14:14 ` Thomas Jacob
2009-07-14  7:58   ` Simion Onea
2009-07-14  9:25     ` Mart Frauenlob
2009-07-14 12:20       ` Simion Onea
2009-07-14 12:40         ` Mart Frauenlob
2009-07-14 12:30       ` Thomas Jacob
2009-07-14 12:27     ` Thomas Jacob
2009-07-14 13:06       ` Simion Onea
2009-07-15  7:38       ` Simion Onea
2009-07-14 15:33     ` Pascal Hambourg [this message]
2009-07-14 18:50       ` Simion Onea
2009-07-14 15:34     ` Thomas Jacob
2009-07-14 19:01       ` Simion Onea
2009-07-14 20:36         ` Vincent Bernat
2009-07-15  7:32         ` Pascal Hambourg
2009-07-15  7:40           ` Simion Onea
2009-07-15 20:12             ` Mike Williams
2009-07-16  5:59               ` Simion Onea

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=4A5CA53A.40703@plouf.fr.eu.org \
    --to=pascal.mail@plouf.fr.eu.org \
    --cc=netfilter@vger.kernel.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