[CentOS] OT - httpd/conf.d include questions - allowing only some addresses

Robert Moskowitz rgm at htt-consult.com
Tue Oct 7 16:44:03 UTC 2014


On 10/07/2014 12:01 PM, Always Learning wrote:
> On Tue, 2014-10-07 at 09:47 -0400, Robert Moskowitz wrote:
>
>> <Directory "/var/www/html">
>>       Options Indexes FollowSymLinks
>>       AllowOverride None
>>       Order deny,allow
>>       allow from 192.84.67.128/255.255.255.0
>>       deny from all
>> </Directory>
> If you want to allow web site access from only
>
> 192.84.67.128/255.255.255.0
>
> then do it in your firewall. The IPtables (ip4) commands would be
> something like this:-
>
> iptables -I {table name} {table position or line number} -p tcp --dport
> 80 -s 192.84.67.128/24 -j ACCEPT
>
> iptables -I {table name} {table position AFTER previous line} -p tcp
> --dport 80 -j DROP

Won't do what I want.  As there is a virtual host that I DO want 
globally accessible.

I have successfully restricted the postfixadmin directory to only local 
networks.  I just have not done it for the default directories.





More information about the CentOS mailing list