1. Method for protecting a packet-based network from attacks, comprising: performing an anomaly detection in the form of a statistical analysis on a session control message contained in a packet stream received in a security border node of the network utilizing message context information about the session control message, when the session control message has a message type that matches an allowed next message type and there is no indication to bypass performing the anomaly detection on the session control message; and updating the message context information to include information about a result of the anomaly detection, wherein the message context information includes client history information and session history information, the client history information indicating a number of received messages and the session history information indicating the allowed next message type.