Re: best place to reject host(s)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> I would like to start rejecting specific hosts to my
> machine without excluding others.
> 
> What is the best way to do this?  iptables?  hosts.allow/deny?
> Or more specifically in my httpd.conf for apache (in this
> case its apache I want to deny access to but I would like
> the list to be able to grow over time without much hassle
> of editting it all over the httpd.conf file).

/etc/hosts.allow only works for services launched from xinted
or with built in tcp_wrappers support.  That doesn't include httpd.
 
Probably you could use an include file in /etc/httpd/conf/httpd.conf.
At the point where you specify your access restrictions put a line
like:

   Include /etc/httpd/conf/allow.conf

In the allow.conf file you could have something like:

   order deny,allow
   deny from all
   allow from ...
   ...

You'd have to reload httpd after modifying the list.

(NB:  I haven't tried this so you should test it before going into
production).



-- 
Ian



-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux