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: Iptables proxy to a different network
Date: Fri, 09 Feb 2007 12:27:13 +0100	[thread overview]
Message-ID: <45CC5A91.4090200@plouf.fr.eu.org> (raw)
In-Reply-To: <D392D4803D14354CBC49D772E19DD0CD45660A@zeus.w2k.nrlmry.navy.mil>

Hello,

Andrus, Mr. Brian (Contractor) a écrit :
> I have a system with a single nic and ip address a.b.c.1 (system A)
> I want to proxy incoming requests to port 80 to a different system on a
> different subnet of x.y.z.1 (system B)
> 
> On system a.b.c.1, I am trying the following in my
> /etc/sysconfig/iptables:
> -----------
> *nat
> -A PREROUTING -p tcp --dport 80 -j DNAT --to x.y.z:80
> COMMIT
> -----------
> 
> This seems to ALMOST work. The request from a client system (System C)
> go to System A, get rewritten and are received by system B. System B
> seems to be responding, trying to send to System C directly, but (I
> think) System C is expecting its response to be from system A, not
> System B, so it ignores the responses.

As usual. Known issue.
If you cannot or do not wish to prevent direct routing between the 
client and the server, you must SNAT the forwarded connections in the 
POSTROUTING chain.


  reply	other threads:[~2007-02-09 11:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-09  0:41 Iptables proxy to a different network Andrus, Mr. Brian (Contractor)
2007-02-09 11:27 ` Pascal Hambourg [this message]
2007-02-09 12:38   ` Jan Engelhardt
2007-02-09 15:22     ` Pascal Hambourg
2007-02-09 16:04       ` Andrus, Mr. Brian (Contractor)
2007-02-09 17:01         ` Pascal Hambourg
2007-02-09 18:50           ` Andrus, Mr. Brian (Contractor)
2007-02-09 19:56             ` Pascal Hambourg
2007-02-09 17:49       ` Jan Engelhardt
2007-02-09 21:38         ` Pascal Hambourg
2007-02-09 22:22           ` Jan Engelhardt
2007-02-13 20:44           ` R. DuFresne
2007-02-13 20:53             ` Jan Engelhardt

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=45CC5A91.4090200@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.