Operating System - Linux
1828667 Members
1600 Online
109984 Solutions
New Discussion

Re: Authentication in Apache -- Plz help

 
SOLVED
Go to solution
Maaz
Valued Contributor

Authentication in Apache -- Plz help

Hello Gurus
apache is configured, and running quite fine.
Plz help me to configure the following

1) if the request is made from a specific machine say for example if the machine's ip is 10.255.255.210 then serve the page, otherwise didnt serve. in short only specific machines(ipes) are allowed to access the website.

2 ) and I have to implement the user/group level authentication as well, i.e only specific users/group are allowed to access the website

Plz help.

Thanking all in anticipation

Regards
Maaz
4 REPLIES 4
Jeff_Traigle
Honored Contributor
Solution

Re: Authentication in Apache -- Plz help

User level authentication can be done with .htaccess and .htpasswd. See the following link for a brief description of how they are used (or check out the Apache documentation on www.apache.org): http://web-bureau.com/modules/bsecure.php

I don't recall, and don't see with a quick perusal of available directives, any way to restrict access by host within httpd. If that's true, I think you're only available options are TCP Wrappers or a host-based firewall with IPFilter. Both of these are available from http://software.hp.com/ for free. (TCP Wrappers shows only available for 11.11, however.)
--
Jeff Traigle
Jeff_Traigle
Honored Contributor

Re: Authentication in Apache -- Plz help

Oops. Didn't realize I'd left myself in the Linux forum before I responded to this one.

TCP Wrappers are available on Linux, though may not be installed by default depending on the installation options you made.

For the host-based firewall, you'd use iptables, which I think get installed for any installation type for RHEL, instead of IPFilter.
--
Jeff Traigle
Jeff_Traigle
Honored Contributor

Re: Authentication in Apache -- Plz help

I was only looking at the core directives for httpd in the earlier response. There are numerous modules that can be loaded to expand its capabilities.

mod_access provides access control based on client hostname, IP address, or other characteristics of the client request.

There are various authentication modules (mod_auth*) depending how your user database is stored.

Check out http://httpd.apache.org/docs/mod for listing and descriptions of the available moules and the section of httpd.conf for Dynamic Shared Object Support, where the modules you want are loaded when httpd starts.
--
Jeff Traigle
Maaz
Valued Contributor

Re: Authentication in Apache -- Plz help

Dear Jeff Traigle, many thanks for the help/asistance.

Regards
Maaz