You are not logged in.

#1 2007-03-01 18:58:25

djidji
Member
Registered: 2007-02-26
Posts: 57

using hosts.allow/deny to manage access to apache and mysql

is it possible? i know i could use httpd.conf to limit access but it would be nice to have one place to manage access to different daemons. how about ldap, ftp, etc.?
as a side question why does hosts.deny have:

ALL: ALL: deny

and not

ALL: deny

thanks in advance for responses.

Offline

#2 2007-03-01 19:21:56

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,730
Website

Re: using hosts.allow/deny to manage access to apache and mysql

By default and as a matter of security no one external to your system is allowed access, that's the reason the files by default have those settings.
To allow access to your machine, and to only specific programs you can use hosts.allow, and hosts.deny.
For instance if you want to enable ssh to a computer in your network with the ip 142.214.2.3 you can add this to hosts.allow

sshd: 142.214.2.3

To allow access to apache and mysql is better to use a firewall. A very effective, easy to use and set up is Firestarter (pacman -Sy firestarter).

Hope this helps.

R

Offline

#3 2007-03-01 20:00:51

djidji
Member
Registered: 2007-02-26
Posts: 57

Re: using hosts.allow/deny to manage access to apache and mysql

thanks for the response. i do plan to use iptables in any case but since i was setting up sshd i just thought there is a way to use the same process for some other daemons. in the meantime i found this post on linuxquestions.org that talks about tcpwrappers and other ways to use hosts.allow to control access to apache: http://www.linuxquestions.org/questions … p?t=297298.
cheers...

Offline

#4 2007-03-02 12:16:43

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: using hosts.allow/deny to manage access to apache and mysql

Run 'ldd /path/to/<daemon>' to check if it's compiled with tcpwrapper support. If you don't see libwrap.so in the output it won't work at all.


1000

Offline

#5 2007-03-02 14:48:51

djidji
Member
Registered: 2007-02-26
Posts: 57

Re: using hosts.allow/deny to manage access to apache and mysql

now that's very useful! thanks...

Offline

Board footer

Powered by FluxBB