public static bool ContainsIp(string ipRule, string clientIp)
        {
            var ip    = ParseIp(clientIp);
            var range = new IPAddressRangeHelper(ipRule);

            if (range.Contains(ip))
            {
                return(true);
            }
            return(false);
        }
        public static bool ContainsIp(List <string> ipRules, string clientIp)
        {
            var ip = ParseIp(clientIp);

            if (ipRules != null && ipRules.Any())
            {
                foreach (var rule in ipRules)
                {
                    var range = new IPAddressRangeHelper(rule);
                    if (range.Contains(ip))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }