All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stephen P. Schaefer" <sschaefer@rfmd.com>
To: netfilter@lists.netfilter.org
Subject: Connection tracking via RPC transaction ID
Date: Wed, 20 Apr 2005 14:42:13 -0400	[thread overview]
Message-ID: <4266A285.1040205@rfmd.com> (raw)

I'm trying to SNAT an NFS client, but the NFS server (a NetApp) has
two IP addresses, and though DNS advertises it at the first address,
e.g. 192.168.200.10, its answers come back from the other address,
e.g., 192.168.2.150. If I'm not behind the SNAT, there's no problem
because the client kernel ignores the source IP address and just looks
at the RPC transaction ID, but behind the SNAT, the fact that the
answer comes back from a different address than that to which the
request went breaks connection tracking.  I've currently worked around
the problem with a DNAT rule:

iptables -t nat -A PREROUTING -d 192.168.200.10 -i eth1 -j DNAT --to-destination 192.168.2.150

...but I'm woried that this is less than robust.  In particular, I
don't understad why the NetApp uses one address or the other to reply,
and what will keep it from behaving differently tomorrow.  Is there a
connection tracking module that works on RPC transaction ID and can
ignore the source address?  Would it be difficult to write?  Is there
code that does something similar that I should study?

For reference, the rest of the relevant setup is like this:

On the netfiltering box:

eth0: 192.168.111.252/24
eth1: 192.168.111.249/30

SNAT:

iptables -t nat -A POSTROUTING -s 192.168.111.250 -d ! 192.168.111.248/30 -o eth0 -j SNAT --to-source 192.168.111.252


             reply	other threads:[~2005-04-20 18:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-20 18:42 Stephen P. Schaefer [this message]
2005-04-20 19:13 ` Connection tracking via RPC transaction ID Jason Opperisano

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=4266A285.1040205@rfmd.com \
    --to=sschaefer@rfmd.com \
    --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.