Syncookie firewall
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines
Quoted 4 lines · Don Cohen
Why do you think that's better than simply forwarding packets with sequence/ack# translation? Surely it's less efficient. And it raises questions about how much data to buffer between the two and how that can be controlled.
Because there is no good way to know the servers TCP options before you have opened the TCP connection to the server, and you do not want to open the TCP connection to the server before the client has acknowledged the connection...
Fortunately, all of these options are ... optional, so the firewall can, if it doesn't know better, simply not use them.
Quoted 6 lines
Adjusting the sequence numbers is the simple part of the picture. Does not worry me.. this is what the NAT engine is doing.
What worries me is
* Window scaling
It would be unfortunate to lose this in some cases, but those are the cases where the firewall is likely to know what sort of window scaling is supported by the server.
Quoted 9 lines
* Timestamp
* ECNand a number of other end-to-end TCP options that depend on correct negotiation during SYN.
Sure, window scaling and ECN can be set by configuration if you know your server, but there is no good way to deal with the timestamp option short of forcibly filter it out entirely from the TCP stream.
The timestamp option is not a problem in this case. The firewall only responds to a few packets and for those it can supply its own timestamp (or not). After it establishes both halves of the connection it just forwards the packets and the timestamps (seems to me) should work out fine.
Quoted 7 lines · Don Cohen
Quoted 4 lines
Because there is no good way to know the servers TCP options before you have opened the TCP connection to the server, and you do not want to open the TCP connection to the server before the client has acknowledged the connection...
Fortunately, all of these options are ... optional, so the firewall can, if it doesn't know better, simply not use them.
To ensure interoperability you must also filter out any options on future packets of that TCP not known to be 100% compatible with your SYN+ACK.
Quoted 5 lines
The timestamp option is not a problem in this case. The firewall only responds to a few packets and for those it can supply its own timestamp (or not). After it establishes both halves of the connection it just forwards the packets and the timestamps (seems to me) should work out fine.
The timestamp option must be real all the time, or never. You cannot suddently switch TCP timestamp source in the middle of a TCP connection. Doing so will serverely break PAWS.
Note: The TCP timestamp option is not the same as the IP timestamp option. TCP timestamps has nothing to do with time, only the progress of relative time within a TCP.
Regards
Henrik
Quoted 3 lines · Henrik Nordstrom
To ensure interoperability you must also filter out any options on future packets of that TCP not known to be 100% compatible with your SYN+ACK.
Widespread deployment of this advice will condemn every future TCP improvement to the hell that ECN is in today.
Signature · 3 lines
Mark Atwood | Well done is better than well said. [email protected] | http://www.pobox.com/~mra
Quoted 5 lines · Henrik Nordstrom
Quoted 2 lines
Fortunately, all of these options are ... optional, so the firewall can, if it doesn't know better, simply not use them.
To ensure interoperability you must also filter out any options on future packets of that TCP not known to be 100% compatible with your SYN+ACK.
There is no need to do anything but send syn and syn/ack without any options that might be incorrect for the other participant. Then it's incorrect for the other side to send them in later packets so there's nothing for you to filter. If the participants want to violate the spec it's not the responsibility of the firewall to prevent them.
Quoted 9 lines
Quoted 5 lines
The timestamp option is not a problem in this case. The firewall only responds to a few packets and for those it can supply its own timestamp (or not). After it establishes both halves of the connection it just forwards the packets and the timestamps (seems to me) should work out fine.
The timestamp option must be real all the time, or never. You cannot suddently switch TCP timestamp source in the middle of a TCP connection. Doing so will serverely break PAWS.
Now that I reread rfw1323 I see that timestamps also are not allowed unless they appear in the first segment. So again the general solution is not to send it.
(Once again I think the "solution" is to change the spec.)
In any case it's sufficient for the firewall to simply not send any timestamp options at all.