From: netfilter@interlinx.bc.ca
To: netfilter-devel@lists.netfilter.org
Subject: Re: How to create a "persistent" expectation with newnat?
Date: Wed, 26 Feb 2003 18:54:06 -0500 [thread overview]
Message-ID: <20030226235405.GA4609@pc.ilinx> (raw)
In-Reply-To: <200302262353.h1QNrjC22019@singularity.tronunltd.com>
[-- Attachment #1: Type: text/plain, Size: 2824 bytes --]
On Thu, Feb 27, 2003 at 09:53:45AM +1100, Ian Latter wrote:
>
> ahhh .. Brian ;-) Didn't see your sig b4 ...
S'ok. It was funny.
> Instead of relying on outgoing connections to maintain the live session,
> leave that out for the time being, and set up an untimed inbound expectation.
But unless I am mistaken, inbound expectations have to be related to
an ESTABLISHED connection. That is fine, except as soon as the
ESTABLISHED connection goes away so does it's expectation(s). With the
nature of P2P like Gnutella, connections come and go like the wind.
That is why the expectation (which is the same for every outgoing and
incoming connection) needs to be refreshed with new master
connections.
> s'cool ... let one out set it off ... and the ins can look after themselves ...
Right. I do refresh the expecation for every outbound connection, but
need to refresh on inbound connections as well as outbound connections
can be few and far between once the client has made it's presence
known.
> Whenever your "end condition" occurs for the client ... then unload all
> of the open expectations ....
Well, the expectation (there is only one, it's the same expectation
for all masters everybody:allports->client:localport) goes away when
it times out or the master connection goes away. That is clean enough
for me.
> so ... a or b rings true, then trash the open
> expects ..
It's just cleaner to let the framework do that for me.
> Even if there's nothing in the payload ... if the NAT has been a masq or
> some other non ip-to-ip mapping, then the helper will need to rewrite the
> ip headers ...
Right. I am already doing that. I do alter the payload in the
outgoing connection if needed -- although with gtk-gnutella, it somehow
determines the outside address of the iptables box so technically it's
not needed.
> this had to be done in rsh .. which works like ftp ... one
> out with a port in the proto for where a new one should come back ..
> this then hits the firewall (tables) as a local port, which then needs to
> be re-written.
Right. That I am doing already as well. I have successfully run two
different clients behind my modules and they both work (while both are
using the same local port), so I must be doing something right. :-)
> I don't see your proto as being tremendously different from ftp ... 'cept
> that the data sessions can be many+ and they can come from
> the universe and not the master destination ... should be pretty straight
> forward ...
'Tis really. In my original message, I think I said it was 99%
working and thought I had to use a hack to get it to work when indeed
my hack was (close to) the right solution. I based heavily on the ftp
and/or irc modules.
b.
--
Brian J. Murrell
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2003-02-26 23:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-26 22:53 How to create a "persistent" expectation with newnat? Ian Latter
2003-02-26 23:54 ` netfilter [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-02-26 21:11 Ian Latter
2003-02-26 22:18 ` netfilter
2003-02-24 5:18 netfilter
2003-02-25 4:43 ` netfilter
2003-02-26 17:41 ` Harald Welte
2003-02-26 20:40 ` netfilter
2003-02-26 21:15 ` Harald Welte
2003-02-26 22:24 ` netfilter
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=20030226235405.GA4609@pc.ilinx \
--to=netfilter@interlinx.bc.ca \
--cc=netfilter-devel@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.