469,356 Members | 1,973 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

checking incoming IP and sending a protected page


Hi all,

How can I write an asp page, say, CHECKIP.asp that checks the incomin
requesting IP address and returns a protected page, based on th
checking result? That is, if the IP is a permitted address, the
presents a page, say, OK.asp. If the IP is not allowed, then send
REJECT.asp. Both OK.asp and REJECT.asp cannot be directly accesse
without going through the CHECKIP.asp. Any idea?

Thanks
Regards
Dere
-
derekin
-----------------------------------------------------------------------
Posted via http://www.webservertalk.co
-----------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message1044106.htm

Jul 22 '05 #1
2 1513

you could check out
http://www.aspprotect.com/more_info_full_v7.asp

and this thread about IP's
http://support.cjwsoft.com/code/code...&KW=ip+address

"dereking" <de*************@mail.webservertalk.com> wrote in message
news:de*************@mail.webservertalk.com...

Hi all,

How can I write an asp page, say, CHECKIP.asp that checks the incoming
requesting IP address and returns a protected page, based on the
checking result? That is, if the IP is a permitted address, then
presents a page, say, OK.asp. If the IP is not allowed, then sends
REJECT.asp. Both OK.asp and REJECT.asp cannot be directly accessed
without going through the CHECKIP.asp. Any idea?

Thanks
Regards
Derek

--
dereking
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message1044106.html

Jul 22 '05 #2
dereking wrote on 02 mei 2005 in microsoft.public.inetserver.asp.general:
How can I write an asp page, say, CHECKIP.asp that checks the incoming
requesting IP address and returns a protected page, based on the
checking result? That is, if the IP is a permitted address, then
presents a page, say, OK.asp. If the IP is not allowed, then sends
REJECT.asp. Both OK.asp and REJECT.asp cannot be directly accessed
without going through the CHECKIP.asp. Any idea?


You are thinking in a password surrounding,
that is not neccessary here.
========= lock.asp [can be external to accessable space]

<%
q = request.servervariables("remote_addr")
If q <> "192.168.123.123" and q <> "192.168.123.456" then
%>
<title>pseudo REJECT.asp</title>
You are out and stay out!
<%
response.end
end if
%>
======== protected page OK.asp

<!--#include virtual ="lock.asp"-->
<title>OK.asp</title>
<body>
You are in<br>
blah...blah
======== protected page OK2.asp

<!--#include virtual ="lock.asp"-->
<title>OK2.asp</title>
<body>
You can also start with this page<br>
blah...blah

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Robert A. van Ginkel | last post: by
9 posts views Thread by D. Shane Fowlkes | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.