<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1017784" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1017784</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/ip-filtering#comment-1104250</link>
    <description> &lt;p&gt;I probably should leave it since we are planning on applying for another group of IP&#039;s.&lt;/p&gt;
&lt;p&gt;Thanks for your help!&lt;/p&gt;
 </description>
     <pubDate>Fri, 08 Mar 2002 21:01:49 +0000</pubDate>
 <dc:creator>zimbabwe</dc:creator>
 <guid isPermaLink="false">comment 1104250 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/ip-filtering#comment-1104249</link>
    <description> &lt;p&gt;Yeah that would work, I would make it simpler though, maybe like:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;UserIP = Request.ServerVariables(&amp;quot;REMOTE_ADDR&amp;quot;)&lt;br /&gt;AllowIP = &amp;quot;172.20.1&amp;quot;&lt;br /&gt;FindDot = InStrRev(UserIP,&amp;quot;.&amp;quot;)&lt;br /&gt;UserIP = Mid(UserIP,1,FindDot - 1)&lt;br /&gt;IPArray = Split(AllowIP,&amp;quot;,&amp;quot;)&lt;br /&gt;For x = LBound(IPArray) To UBound(IPArray)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If UserIP = IPArray(x) Then Response.Redirect &amp;quot;meter.php&amp;quot;&lt;br /&gt;Next&lt;br /&gt;Response.Write &amp;quot;&amp;amp;lt;script&amp;amp;gt;&lt;br /&gt;alert(\&amp;quot;Only customers are allowed to use bandwidth test.\&amp;quot;);&lt;br /&gt;badpage=&amp;#039;http://www.domain.com/wireless.htm&amp;#039;;&lt;br /&gt;document.location.href=badpage;&lt;br /&gt;&amp;amp;lt;/script&amp;amp;gt;&amp;quot;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;If you know you&#039;re only going to allow one group you don&#039;t need to use the array, but if you think you might need to add another group you should keep it.&lt;/p&gt;
 </description>
     <pubDate>Fri, 08 Mar 2002 20:55:33 +0000</pubDate>
 <dc:creator>Peter J. Boettcher</dc:creator>
 <guid isPermaLink="false">comment 1104249 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/ip-filtering#comment-1104248</link>
    <description> &lt;p&gt;I want to block all IP addresses except for a certain group.&lt;/p&gt;
&lt;p&gt;I don&#039;t know ASP that well (I am checking out &lt;a href=&quot;http://www.asp101.com&quot; class=&quot;bb-url&quot;&gt;asp101.com&lt;/a&gt;) so is there a way to allow a certain group of IP addresses while blocking all the rest?  Would this work?&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;UserIP = Request.ServerVariables(&amp;quot;REMOTE_ADDR&amp;quot;)&lt;br /&gt;AllowIP = &amp;quot;172.20.1&amp;quot;&lt;br /&gt;FindDot = InStrRev(UserIP,&amp;quot;.&amp;quot;)&lt;br /&gt;UserIP = Mid(UserIP,1,FindDot - 1)&lt;br /&gt;IPArray = Split(AllowIP,&amp;quot;,&amp;quot;)&lt;br /&gt;For x = LBound(IPArray) To UBound(IPArray)&lt;br /&gt;If UserIP = IPArray(x) Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write &amp;quot;&lt;br /&gt;&amp;amp;lt;script&amp;amp;gt;&lt;br /&gt;&amp;lt;!-- &lt;br /&gt;nextpage=&amp;#039;meter.php&amp;#039;; &lt;br /&gt;document.location.href=nextpage&lt;br /&gt;// --&amp;gt;&lt;br /&gt;&amp;amp;lt;/script&amp;amp;gt;&amp;quot;&lt;br /&gt;Else&lt;br /&gt;Response.Write &amp;quot;&amp;amp;lt;script&amp;amp;gt;&lt;br /&gt;alert(\&amp;quot;Only customers are allowed to use bandwidth test.\&amp;quot;)&lt;br /&gt;badpage=&amp;#039;http://www.domain.com/wireless.htm&amp;#039;&lt;br /&gt;document.location.href=badpage&lt;br /&gt;&amp;amp;lt;/script&amp;amp;gt;&amp;quot;&lt;br /&gt;End If&lt;br /&gt;Next&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Fri, 08 Mar 2002 20:37:50 +0000</pubDate>
 <dc:creator>zimbabwe</dc:creator>
 <guid isPermaLink="false">comment 1104248 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/ip-filtering#comment-1104207</link>
    <description> &lt;p&gt;Here&#039;s some ASP I made, maybe it will help:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;UserIP = Request.ServerVariables(&amp;quot;REMOTE_ADDR&amp;quot;)&lt;br /&gt;BlockIP = &amp;quot;172.20.2,172.20.3,172.20.4&amp;quot;&lt;br /&gt;FindDot = InStrRev(UserIP,&amp;quot;.&amp;quot;)&lt;br /&gt;UserIP = Mid(UserIP,1,FindDot - 1)&lt;br /&gt;IPArray = Split(BlockIP,&amp;quot;,&amp;quot;)&lt;br /&gt;For x = LBound(IPArray) To UBound(IPArray)&lt;br /&gt;If UserIP = IPArray(x) Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#039;Put code here to handle bad ips&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write &amp;quot;Your IP is in the block list&amp;quot;&lt;br /&gt;End If&lt;br /&gt;Next&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;So basically just enter the IPs you want to block in the BlockIP string separated by a &quot;,&quot;, I didn&#039;t include the fourth segment of the IP since I assumed you wanted to block the whole range (0-255)&lt;/p&gt;
 </description>
     <pubDate>Fri, 08 Mar 2002 13:51:06 +0000</pubDate>
 <dc:creator>Peter J. Boettcher</dc:creator>
 <guid isPermaLink="false">comment 1104207 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/ip-filtering#comment-1104175</link>
    <description> &lt;p&gt;I managed to get the result that I wanted with PHP... while I have a post here, how do you set a range for an IP address in PHP?&lt;/p&gt;
&lt;p&gt;For example, this is the scripting that I had to use to get my filter to work:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;PHP &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;print \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Verifying Access Rights...Please Wait\&quot;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$IPAllow&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = array(\&quot;xxx.xxx.xxx.1\&quot;,\&quot;xxx.xxx.xxx.2\&quot;,\&quot;xxx.xxx.xxx.3\&quot;, ....... \&quot;xxx.xxx.xxx.255\&quot;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$IPAllowString&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = implode (\&quot;:\&quot;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$IPAllow&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;); &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$verify&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = getenv(\&quot;REMOTE_ADDR\&quot;); &lt;br /&gt;&lt;br /&gt;if (strstr(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$IPAllowString&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$verify&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)) { &lt;br /&gt;echo \&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;amp;lt;script&amp;amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nextpage=&#039;meter.php&#039;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.location.href=nextpage&lt;br /&gt;// --&amp;gt;&lt;br /&gt;&amp;amp;lt;/script&amp;amp;gt;\&quot;; &lt;br /&gt;&lt;br /&gt;} else { &lt;br /&gt;echo \&quot;&lt;br /&gt;&amp;amp;lt;script&amp;amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Sorry&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;only customers may &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;use &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;bandwidth test&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; badpage=&#039;http://www.domain.com/wireless.htm&#039;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.location.href=badpage&lt;br /&gt;// --&amp;gt;&lt;br /&gt;&amp;amp;lt;/script&amp;amp;gt;\&quot;; &lt;br /&gt;} &lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
That seems like a waste of time to type out 255 addresses...  Hopefully I don&#039;t have to add another group of IP&#039;s, but it would be nice to know how to set a range of 0-255 for the last octet of the ip addresses.&lt;br /&gt;
Thanks,&lt;/p&gt;
&lt;p&gt;Zimbabwe&lt;/p&gt;
 </description>
     <pubDate>Fri, 08 Mar 2002 02:03:04 +0000</pubDate>
 <dc:creator>zimbabwe</dc:creator>
 <guid isPermaLink="false">comment 1104175 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/ip-filtering#comment-1104157</link>
    <description> &lt;p&gt;Moving this to Server-Side Scripting as you&#039;ll find the right answers there. &lt;/p&gt;
&lt;p&gt;I believe there is an option for MS servers. You can also run Apache on an MS server?&lt;/p&gt;
 </description>
     <pubDate>Fri, 08 Mar 2002 00:21:10 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1104157 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/ip-filtering#comment-1104149</link>
    <description> &lt;p&gt;I am using a Windows NT server...I also have a Windows 2000 server.&lt;/p&gt;
&lt;p&gt;Do I need a Linux/Unix server?&lt;/p&gt;
 </description>
     <pubDate>Thu, 07 Mar 2002 22:59:24 +0000</pubDate>
 <dc:creator>zimbabwe</dc:creator>
 <guid isPermaLink="false">comment 1104149 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/ip-filtering#comment-1104148</link>
    <description> &lt;p&gt;umm.. I have never used .htaccess files..  what do I need for them, and what are they?&lt;/p&gt;
 </description>
     <pubDate>Thu, 07 Mar 2002 22:55:52 +0000</pubDate>
 <dc:creator>zimbabwe</dc:creator>
 <guid isPermaLink="false">comment 1104148 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/ip-filtering#comment-1103972</link>
    <description> &lt;p&gt;Just do it using an .htaccess file like so:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Limit GET&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;order deny&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;allow&lt;br /&gt;allow from all&lt;br /&gt;deny from IP Address&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;Limit&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;That will work no matter what browser they are using.&lt;/p&gt;
 </description>
     <pubDate>Wed, 06 Mar 2002 02:15:37 +0000</pubDate>
 <dc:creator>mairving</dc:creator>
 <guid isPermaLink="false">comment 1103972 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
