The code of PreventIp