-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Casper Dik wrote:
|>Clayton Fiske writes:
|>>I'm not sure about the state table issue, but why is the source
|>>port number the same for both connections? Seems to me that the
|>>"finished" connection may still be in the mailhost's TCP table
|>>(as seen in netstat) as TIME_WAIT or whatever, and as such any
|>>new traffic on that socket elicits the closing ACK from the
|>>previous connection?
|>>
|>
|>Connections could stay in TIME_WAIT for up to 2xMSL.  Anyone know how
|>to check the MSL time on Solaris 8?
|
|
| By default it's 4 minutes.  Many people tune it down to 60 seconds.
|
|
|>Even if the connection was still in TIME_WAIT, the RST packet
|>should have reset ipfilter's state table entry and the next SYN should
|>have created a new state table entry.
|
|
| No, an ACK should be send, not a RST.
|
| Casper

I haven't been following this too closely, but there's another scenario that I
have to deal with once in a while, and it sounds like it could conceivably be
relevant:

Host A behind NAT firewall has various established TCP connections to host B
outside firewall. These connections were originally established shortly after
the firewall was booted, so they lie in the bottom end of the NAT port range.

Firewall is rebooted for one reason or another. Host A eventually drops
connections to host B, or the processes on host A are killed, but host B never
receives RST packets for these; host A just tries to FIN close them and
eventually gives up. Or, you might even reboot host A.

Host A attempts to reconnect to host B. Because the firewall was just booted,
NAT maps some or all of these new connections onto the same port numbers they
had before the firewall was rebooted. From host B's point of view, host A is
sending new SYNs with incorrect sequence numbers for connections that are
already in ESTABLISHED state. Host B ignores the SYNs, and the reconnections
on host A never leave SYN_SENT state. The reconnect attempts all hang.

This can go on for quite a long time, depending on use and settings of TCP
keepalives. Host B has to learn that the connections in ESTABLISHED state are
closed. If host B sends window probes, it *might* get RST packets back from
the firewall. But it might not; host A might even be using the same source
port numbers for the reconnects (perhaps due to port wraparound, or if host A
was rebooted also). In this case, the two hosts are in different TCP states
and sequence spaces for identical 5-tuples, and the firewall lets them remain
in this confused state.

To avoid this problem, usually when I reboot my firewall when already
established connections are going to be disrupted, I change the port range
used for NAT.

- --
Jefferson Ogata <[EMAIL PROTECTED]>
NOAA Computer Incident Response Team (N-CIRT) <[EMAIL PROTECTED]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE90u6aMGvwWXytL5ARAvInAJ4sKmdpFh7ITLmgYPFNqbY3m0kwlgCfaxYc
aGbyzm9zU+cFh6rgprfMegY=
=GwLj
-----END PGP SIGNATURE-----

Reply via email to