All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clayton Russell <clayton.russell@vector.net.au>
To: netfilter@lists.netfilter.org
Subject: Re: SNAT & DNAT
Date: Wed, 20 Oct 2004 09:54:22 +1000	[thread overview]
Message-ID: <4175A92E.1000600@vector.net.au> (raw)
In-Reply-To: <20041018152033.C85228A3C0@bne-mail01.vector.net.au>

Lee Evans wrote:
> Hi,
> 
> Sorry if this has been asked before in some other guise - I looked through
> the archives but couldn't spot anything (or a search feature..)
> 
> I'm going to be implementing a gateway system using IPTables, which will
> need to perform both DNAT & SNAT on incoming connections.
> 
> The reason being that I want to provide external access to systems on a LAN
> which do not have a default gateway (and nor do I want them to have one).
> 
> The connections will come in to the public IP of the gateway and be DNAT'ed
> to the internal IP PREROUTING, and then SNAT'ed to the gateway's private IP
> POSTROUTING so that the internal systems have a route out for reply traffic.
> 
> I've tested this on a small test-network but before I try to roll it out on
> a larger scale, are there any issues with doing this that I should be aware
> of?
> 
> Thanks
> Lee
> 
> 
Hi Lee,

I have had problems with this in the past with strange protocols which 
the connection tracking does not recognise as related.  For example, xdm 
over this arrangment has some initial udp communication to organise the 
X connection, then the client side (LAN in your case) initiates a TCP 
connection to the server.  In this scenario the fw does not recognise 
the tcp connection as related to the udp connection, and does not know 
how to NAT this packet.

This is a fairly strange example though, things like telnet, web etc all 
worked fine.

Hope this helps,
Clayton

-- 
Clayton Russell
Systems Administrator
Vector Networks Pty Ltd
em: clayton.russell@vector.net.au
wb: www.vector.net.au
ph: +61 7 3236 9328




       reply	other threads:[~2004-10-19 23:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20041018152033.C85228A3C0@bne-mail01.vector.net.au>
2004-10-19 23:54 ` Clayton Russell [this message]
2004-10-18 14:46 SNAT & DNAT Lee Evans

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=4175A92E.1000600@vector.net.au \
    --to=clayton.russell@vector.net.au \
    --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.