Skip to contentSkip to conversation

Nat Code Confusion

DISCUSSION Ricky Foo 2 participants 2 messages Jun 20, 2003 – Jun 24, 2003 netfilter

lore
Share & tools
lore

Ricky Foo

author
#0 lore raw

Hi,

The confused one is back. As usual, a couple of grey areas:

1. Under the data_fixup section for nat, e.g. amanda, there's this line:

newip = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip;

What's the rationale for selecting the direction to use?

2. Under the nat_expected similar for amanda, the following lines:

	newdstip = ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.ip;
	newsrcip = master->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip;

    Again, what's the rationale for selecting the direction and in each 

case, ct or master to use?

3. Just a wild observation. Is the Harald the official spokesman for netfilter as it seems he's the only guy answering all the questions.

Ok, that's it.

Ricky

_________________________________________________________________
Keep track of Singapore stock prices. http://www.msn.com.sg/money/

#1 lore raw
Quoted 8 lines · Ricky Foo

The confused one is back. As usual, a couple of grey areas:

1. Under the data_fixup section for nat, e.g. amanda, there's this line:

newip = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.ip;

What's the rationale for selecting the direction to use?

Quoted 7 lines

2. Under the nat_expected similar for amanda, the following lines:

	newdstip = ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.ip;
	newsrcip = master->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip;

    Again, what's the rationale for selecting the direction and in each 

case, ct or master to use?

A connection tracking entry is directed, the same way the TCP/UDP session was established (DIR_ORIGINAL is the direction of the first packte in the connection).

In the conntrack helper you need to carefully chose the right direction, since the REPLY tuples get modified by the nat code.

Quoted 2 lines

3. Just a wild observation. Is the Harald the official spokesman for netfilter as it seems he's the only guy answering all the questions.

Well, it's not really true that I answer all questions. I jus read through this list every couple of days and catch up with all unreplied stuff.

Answering to lots of questons on the mailinglists was one of the reasons why I was invited to the coreteam some three years ago, so it seems to be some kind of 'tradition'.

Apart from that, I'm the only core team member who gets (partially) sponsored by a company to work on netfilter/iptables, so I'm likely to have the most time of all of us to spend on the project.

Quoted 2 lines

Ok, that's it.
Ricky

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie