[tproxy] can't tproxying in special case

wckwon wckwon at torinet.co.kr
Tue Jan 17 09:04:08 CET 2006


Hi.

 

In special network condition, I found that TPROXY didn't work. 

 

I tried to change source ip to another using below code.

==================== CODE START ========================

itp.op           = TPROXY_ASSIGN;

itp.v.addr.faddr = (another);

itp.v.addr.fport = htons(0);

setsockopt(s, SOL_IP, IP_TPROXY, &itp, sizeof(itp));

itp.op      = TPROXY_FLAGS;

itp.v.flags  = ITP_CONNECT;

setsockopt(s, SOL_IP, IP_TPROXY, &itp, sizeof(itp));

==================== CODE END ==========================

It goes well when general TCP/IP state.

But in case tcp sequence number of received packet is something wierd, 

LINUX tcp/ip stack make be zero sequence number and ack number.

And source ip address is not changed !!!

Of cource other sessions's source ip address is changed very well.

 

Especially only if I connect to windows system, this is occurred. 

 

My System Info:

O S : linux-2.6.9

TRPOXY verserion : 2.0.1

ETC. : Using Bridge network

 

Now, I am studying TCP/IP kernel stack. And My eyes and my head is very
dizzy.

 

Thanks.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/tproxy/attachments/20060117/db53f0bf/attachment.html


More information about the tproxy mailing list