All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@lists.netfilter.org
Subject: Re: DNAT and local hosts
Date: Tue, 08 May 2007 11:03:34 +0200	[thread overview]
Message-ID: <46403CE6.5010700@plouf.fr.eu.org> (raw)
In-Reply-To: <46403616.60103@plouf.fr.eu.org>

Pascal Hambourg a écrit :
> 
> 3) NAT or MASQUERADE the source address of the redirected connections, 
> so the replies from C1 are routed back to the firewall and can be 
> properly un-DNATed before they reach C2 :
> 
> iptables -t nat POSTROUTING -o eth0 -d 192.168.0.10 \
>   -p tcp --dport 1234 -j SNAT --to-source <eth0_address>

Oops, I forgot "-s 192.168.0.0/24" in order to avoid hiding 
unnecessarily the source address of external connections to C2.

> or :
> 
> iptables -t nat POSTROUTING -o eth0 -d 192.168.0.10 \
>   -p tcp --dport 1234 -j MASQUERADE

Same here.


  reply	other threads:[~2007-05-08  9:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-07 15:54 DNAT and local hosts Pieter De Wit
2007-05-07 16:01 ` Jan Engelhardt
2007-05-07 19:54   ` Pieter De Wit
2007-05-08  6:05     ` Ray Leach
2007-05-08  6:09       ` Pieter De Wit
2007-05-08  6:36         ` Ray Leach
2007-05-08  6:38           ` Pieter De Wit
2007-05-08  8:39             ` Jan Engelhardt
2007-05-08  8:43       ` Jan Engelhardt
2007-05-08  8:34 ` Pascal Hambourg
2007-05-08  9:03   ` Pascal Hambourg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-05-07 15:49 Pieter De Wit
2007-05-07 15:49 Pieter De Wit

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=46403CE6.5010700@plouf.fr.eu.org \
    --to=pascal.mail@plouf.fr.eu.org \
    --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.