IDS protection optimization