I have a subnet in the format 10.132.0.0/20 and an IP address from the ASP.Net request object.
Is there a .NET framework function to check to see if the IP address i
I'm late to the party here, but had a similar need, and put together a quick package to do exactly this.
https://www.nuget.org/packages/IpMatcher/
and source:
https://github.com/jchristn/IpMatcher
Simple use:
using IpMatcher;
Matcher matcher = new Matcher();
matcher.Add("192.168.1.0", "255.255.255.0");
matcher.Add("192.168.2.0", "255.255.255.0");
matcher.Remove("192.168.2.0");
matcher.Exists("192.168.1.0", "255.255.255.0"); // true
matcher.Match("192.168.1.34"); // true
matcher.Match("10.10.10.10"); // false