I just added this to my web.config:
<security>
<ipSecurity allowUnlisted="false">
<!-- The following IP addresses are granted access, all else denied -->
<add allowed="true" ipAddress="123.123.105.0" subnetMask="255.255.255.0" />
<add allowed="true" ipAddress="123.123.100.0" subnetMask="255.255.255.0" />
</ipSecurity>
</security>
Works exactly as intended, only over that certain IP range. BUT, now when I go to test this in Visual Studio via iisExpress over localhost it of course gives me issues. Here is the 500.19 error I receive:
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
I have setup IPSecurity on my localmachine in the services panel, so that is enabled, and I have monkeyed around with options in the ipSecurity block such as adding 'localhost' as a domainName value - but alas no luck. .... help me StackOverflow, you're my only hope! ;)