Note that there are some explanatory texts on larger screens.

plurals
  1. POalternate ways of restricting asp.net website (other than by IP & password)
    primarykey
    data
    text
    <p>I am currently IP restricting several asp.net websites using rewrite rules in my web.config that match our office IP range.</p> <pre><code>&lt;system.webServer&gt; &lt;rewrite&gt; &lt;rules&gt; &lt;rule name="Block IP" stopProcessing="true"&gt; &lt;match url="^403.html$" negate="true"/&gt; &lt;conditions&gt; &lt;add input="{HTTP_X_CLUSTER_CLIENT_IP}" pattern="{MY OFFICE IP RANGE}" negate="true"/&gt; &lt;/conditions&gt; &lt;action type="Redirect" url="403.html" redirectType="SeeOther"/&gt; &lt;/rule&gt; &lt;/rules&gt; &lt;/rewrite&gt; </code></pre> <p></p> <p>The sites also require a username and password in order to view anything. But I'd like to have a second layer of protection like an ip block that prevents malicious activity. Since I often have people outside of our office that need to access the site, I can't always keep the IP block in place. What are some alternate ways of restricting access to asp.net websites that will work in a standard shared hosting environment? (something like VPN isn't an option since my webhost doesn't provide anything like that).</p> <p><strong>Edit:</strong> It has been brought to my attention that you can also configure the ip filtering using the native features of IIS rather than rewrite rules. Here is an example:</p> <pre><code>&lt;security&gt; &lt;ipSecurity allowUnlisted="true"&gt; &lt;!-- this line allows everybody, except those listed below --&gt; &lt;clear/&gt; &lt;!-- removes all upstream restrictions --&gt; &lt;add ipAddress="83.116.19.53"/&gt; &lt;!-- blocks the specific IP of 83.116.19.53 --&gt; &lt;add ipAddress="83.116.119.0" subnetMask="255.255.255.0"/&gt; &lt;!--blocks network 83.116.119.0 to 83.116.119.255--&gt; &lt;add ipAddress="83.116.0.0" subnetMask="255.255.0.0"/&gt; &lt;!--blocks network 83.116.0.0 to 83.116.255.255--&gt; &lt;add ipAddress="83.0.0.0" subnetMask="255.0.0.0"/&gt; &lt;!--blocks entire /8 network of 83.0.0.0 to 83.255.255.255--&gt; &lt;/ipSecurity&gt; &lt;/security&gt; </code></pre> <p>Edit: To clarify what I'm asking for - <strong>I'm looking for OTHER ways to restrict access to a site. My ip filtering works fine. However it isn't ideal since my users sometimes access from ip addresses not on the list.</strong> </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload