473,396 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1596

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert A. van Ginkel | last post by:
Hello Fellow Developer, I use the System.Net.Sockets to send/receive data (no tcpclient/tcplistener), I made a receivethread in my wrapper, the receivethread loops/sleeps while waiting for data...
2
by: Marcelo | last post by:
Hi guys, I'm using the following code to send values from one page to another, but seems to me, that the event Page_Load in the receiving page never fires. Why? This is the code: Thanks ...
9
by: D. Shane Fowlkes | last post by:
(ASP.NET 2 / VB) Question - How can I write a If statement to see if a control (textbox) actually exists on a page? Upon page_load, a certain control may or may not be visible on the page so I...
1
by: R.A.M. | last post by:
Hello, I have written an .aspx page which calls Calendar.aspx page to select birth date which should be assign to some text box control on first page. Here's the code of first page: Birthdate:...
0
by: cvijaykrishna | last post by:
i am having a web based application and i am having a problem with it pls check it Explanationi am sending a sample code plese see it in VS-2005 FOR BETTER UNFERSTANDING I have a main page...
1
by: vidhyapriya | last post by:
hi..i am sending sms message from my mobile to server...i am using sms gateway to receive the incoming sms...i want to store the incoming sms in my sql server database..how to do this.. can anyone...
1
by: ledneh | last post by:
I've been working on concurrency checking for an application I'm building, and a minor part of it has me slightly stumped. I've got a DetailsView that populates from an ObjectDataSource, using...
3
by: raj200809 | last post by:
when i m sending mail i received error from symantec Antivirus" Your email message was unable to be sent because your mail server rejected the message 550-5.7.1 the ip you’re using to send mail is...
9
by: sweatha | last post by:
Hi I have the normal server and not the SMTP service installed. I need to send a mail once if I click a button. Can anybody help me regarding that
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.