Código fuente de 'Filtros IP.asp'
<html>
<head>
<title>Filtro de IPs - Códigos asp, programacion asp, descargas asp, rutinas asp</title>
</head>
<p align="center"><b><font size="3">Filtro de IPs</font></b></p>
En este caso si la IP no pertenece al rango 127.0* no se permite el acceso.<br>
<%@ Language=VBScript %><%
'**************************************
' Name: Only allow certain IP Segments to view your page.
' Description:This code allows you to only let in a certain range of IP address to your ASP page.
' That way you can filter out anybody who isn't from a certain domain(s).
'
' By: Blake Pell
Dim myIP
myIP = Request.ServerVariables("REMOTE_ADDR")
'change the ip below... 127.0. is 127.0* so if you're ip has that listed it will let you in, otherwise,
' it won't... the farther you go down on the ip segement the more you will restrict
if InStr(myIP, "127.0.") > 0 Then
' Good Domain, Let them in
response.write "<br><br>Autorizado el acceso<br>"
Else
response.write "<br><br>Tu IP es:" & myip
response.write "<br><br>Autorización denegada<br>"
response.write "<br>Tu dominio no pertenece a lista de IPs autorizadas para ver esta página<br>"
response.end
End if
%></body></html>