Skip to contentSkip to conversation

libnetfilter_conntrack and port of router

DISCUSSION Tomasz Próchniak 2 participants 2 messages Jan 9, 2006 – Jan 21, 2006 netfilter

lore
Share & tools
lore
#0 lore raw

Hi

First sorry about my English.

I have a important (to me) question.

I have 2.6.14-5 kernel and libnetfilter_conntrack-0.0.28/ and libnfnetlink-0.0.13/

i do not know how to get info about nat (port and ip, witch it will be seen in net)

example:
10.0.0.10:8888 ---------->10.0.0.1||88.88.88.88:3333--------->1111:22.22.22.22
my comp after nat my router comp in net

im intrasted about 88.88.88.88 and port 3333

i have struct

struct nfct_conntrack {
        struct nfct_tuple tuple[NFCT_DIR_MAX];

        u_int32_t       timeout;
        u_int32_t       mark;
        u_int32_t       status;
        u_int32_t       use;
        u_int32_t       id;

        union nfct_protoinfo protoinfo;
        struct nfct_counters counters[NFCT_DIR_MAX];
        struct nfct_nat nat;       //does this info should be in this struct??
};

but this struct

struct nfct_nat {
        u_int32_t min_ip, max_ip;
        union nfct_l4 l4min, l4max;
};

if filled with 0 :(

pleas help me

thanks Kornik

Signature · 5 lines
Mylić się jest rzeczą ludzką,
ale żeby naprawdę coś spaprać
 potrzeba komputera.

Edward Morgan Forster
#1 lore raw
Quoted 11 lines · Tomasz Próchniak

Hi

First sorry about my English.

I have a important (to me) question.

I have 2.6.14-5 kernel and libnetfilter_conntrack-0.0.28/ and libnfnetlink-0.0.13/

i do not know how to get info about nat (port and ip, witch it will be seen in net)

you have to look at the original and the reply tupl.

Quoted 2 lines
struct nfct_conntrack {
        struct nfct_tuple tuple[NFCT_DIR_MAX];

everything is in those two struct nfct_tuple.

Signature · 5 lines
- Harald Welte <[email protected]>                 http://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