Allowing only access to my web site from a link to another web using APACHE

Allowing only access to my web site from a link to another web using APACHE

Post by Orlando » Thu, 09 Jan 2003 05:27:19

I was directed by my supervisor to allow only a specific IP address
and a link from another web site to be able to login to our Web site.
If a user other than with IP 167.893.2.1 logs in directly to our Web
site (, it will automatically redirect it
to the other site ( and will now be able
to login. But the user with the IP address 167.893.2.1 can login
directly. I try to solve this by editing the httpd.conf by inserting
the following:

                      DocumentRoot "/usr/www/abc"
                      <Directory "/usr/www/abc">
                          Options Indexes FollowSymLinks MultiViews
                          AllowOverride AuthConfig
                          Order allow,deny
                          Allow from
                          Allow from 167.893.2.1
                      ErrorDocument 403

The user with IP 167.893.2.1 was able login directly but the user who
try to connect using the web site with IP address of
cannot log-in because the system is looking at the original IP address
167.893.2.1) of the user not the linking web site with IP (see the access logs).

This is the access logs:

167.893.2.1 - esmith [03/Jan/2003:11:20:36 -0500] "GET
/html/mypage.html HTTP/1.0" 200 1234 ""
[en] (Win98; U)"
123.456.7.8 - - [07/Jan/2003:11:52:22 -0500] "GET / HTTP/1.0" 304 287"
n=browse&sort=name" "Mozilla/4.7 [en] (Win95; U)"

Thanks for any help.



1. Using MAPS RBL to control access to Apache web site

Not wanting to provide services for spammers and other net abusers,
and not being in control of the router to my site, I decided that it
would be appropriate for me to deny access to my web pages to systems
on the MAPS RBL.  Unfortunatly, this does not seem to be a standard
extention to apache, so I wound up creating a new module (based on
mod_access) to allow checks via RBL-like DNS servers.

At the current time, this has only been tested on a single low-volume
web server on a Solaris 7 system.  If there is interest, I'll do some
testing on other systems I have available, and document it so others
can play with it.

Also, it would help my testing if a few more people would access my
web site (especialy from sites in the RBL):

Info on the MAPS RBL can be obtained from:

"Text is a way we cheat time." -- Patrick Nielsen Hayden

2. Hacked? TCP port 12345 and UDP port 2364

3. Linking several web servers for single externel web access

4. Compiling Apache_1.3.9

5. Fwd: Intel Secrets Web Site forced to quit some web site activity...

6. How do I access a a #file# and what is it?

7. using /etc/passwd to access web site

8. ipchains question

9. Newbie: Can't access Apache web site from remote machine

10. Accessing web pages using <a> links only

11. Securing web site directories using Apache Server

12. Can i host 2 web sites using Apache ?

13. Preventing Web Access using Apache