TCP Sequence number renumbering

Juan Luis Baptiste juancho at linuxmail.org
Sun Apr 7 13:08:01 EDT 2002


Hi Eddie,


I'm trying to figure out how TCPRewriter does sequence number renumbering to use in my FtpPortMapper6 element, please tell me if I got it all right, and answer me some questions.


What TCPRewriter does, only focusing in the sequence number renumbering is save the last known sequence number of each mapping in the table, and when FtpPortMapper translates the packet and the packet data growed or shrinked, it uses TCPRewriter to do sequence number renumbering. For this, TCPRewriter calculates the delta between the new sequence number and the last known one (of the entries in the mapping table), updates it in the mapping table and calculates the new sequence number for the new packet. If TCPRewriter didn't do this, all the next sequence numbers would be all wrong from the moment the first FTP packet is translated.

And here are the questions:

1. I see that TCPRewriter inherits from IPRewriter, so TCPRewriter can do everything that IPRewriter does, plus some other things like TCP secuence number renumbering. I see that the mazu-nat configuration uses both elements, IPRewriter rewrites all packets
but not FTP packets, for those ones TCPRewriter is used. Does IPRewriter and TCPRewriter share the same mapping table, or each one have one of their own, and the one of TCPRewriter only have mappings that corresponds to FTP flows?

2. As you sugested, I would have to do an TCPAddressTranslator element, equivalent to TCPRewriter. I have not very clear what things from TCPRewriter I need only to do secuence number renumbering (I don't understand what are things like '_tcp_gc_interval' and what are they use, and if I need them for the sequence renumbering,) as I do not have time in this moment to implement the whole TCPRewriter functionality with AddressTarnslator.



Thanks for your great and fast answers,



Juan Luis
-- 

Get your free email from www.linuxmail.org 


Powered by Outblaze



More information about the click mailing list