public static boolean isLicitIp(String ip)
    {
        if(StringUtils.isEmpty(ip))
            return false;
        String regex = "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$";
        Pattern p = Pattern.compile(regex);
        Matcher m = p.matcher(ip);
        return m.find();
    }