Approaches for preventing TCP RST attacks and TCP SYN attacks in
packet-switched networks are disclosed. In one approach, upon receiving a
TCP RST packet, a first endpoint node challenges the second endpoint node
in the then-current connection using an acknowledgement message. If the
connection is genuinely closed, the second endpoint node responds with a
RST packet carrying an expected next sequence value. The first endpoint
node takes no action if no RST packet is received. Thus, attacks are
thwarted because an attacker does not receive the acknowledgment message
and therefore cannot provide the exact expected next sequence value.