I was thinking of using this code to block access to public methods in my asp.net mvc application:
/// <summary>
/// Comma seperated string of allowable IPs with masks. Example "10.2.0.0;255.255.0.0,10.3.0.0;255.255.0.0"
/// </summary>
/// <value>The masked Ips.</value>
public string AllowedMaskedIPs { get; set; }
Excerpt taken from here.
But I was curious as to what is the difference between a masked ip and a single ip? Basically, what is a masked ip?
A Masked IP in the context you mentioned is a network range, which in turn is the network address plus its subnet mask. One uses this to match all IP addresses from a particular network.
Example from the link you posted:
The example given matches all hosts between (and including) 10.2.0.0 and 10.2.255.255.
Have a look at the Wikipedia article on subnetting for a more detailed explanation.
A single IP is similar to a masked ip with a mask of 255.255.255.255 or /32 in CIDR notation.
A masked IP is, in this case, a subnet definition.
means 10.2.0.0/16 which are all addresses from 10.2.0.0 to 10.2.255.255 (including network and broadcast addresses)