hosts.allow a hosts.deny

Zdenek Pytela letty na mrakoplas.phil.muni.cz
Pátek Červen 8 17:12:06 CEST 2001


Zkoumalek píše:
> Nastavoval jsem si na SuSE 7.1 soubory hosts... V manualu jsem se docetl, ze treti udaj v souboru. muze byt prikaz, ktery se provede v pripade, ze se dane pravidlo pouzilo a dane podmince vyhovovalo. Nastavoval jsem to podle knihy LDP. Chtel jsem si do logu vypisovat lidi, kteri se mi pripoji k pocitaci.
> Bohuzel mi to s tim tretim parametrem nefunguje.
> Mel jsem zadano (hosts.allow):
> in.ftpd:ALL: echo "test" >> /var/log/tcpd.log
> potom
> in.ftpd:ALL: /bin/echo "test" >> /var/log/tcpd.log
> potom
> in.ftpd:ALL: (echo "test" >> /var/log/tcpd.log)
> taky
> in.ftpd:ALL: "echo 'test' >> /var/log/tcpd.log"
> 
> ale vzdycky me ftpd neprijal a v logu jsem mel:
> Jun  8 11:14:32 server in.telnetd[4747]: error: /etc/hosts.allow, line 6: bad option name: "/bin/echo"
> 
> Lopotil jsem se s tim pres hodinu. Nevite, cim to je? Bez tretiho parametru to funguje jak ma...
hosts_access (5)
...
       An extended version of  the  access  control  language  is
       described in the hosts_options(5) document. The extensions
       are turned on at  program  build  time  by  building  with
       -DPROCESS_OPTIONS.
...
hosts_options (5)
...
       The extensible language uses the following format:

          daemon_list : client_list : option : option ...

...
RUNNING OTHER COMMANDS
       spawn shell_command
              Execute,  in  a  child process, the specified shell
              command, after performing the %<letter>  expansions
              described  in the hosts_access(5) manual page.  The
              command is executed with stdin, stdout  and  stderr
              connected to the null device, so that it won´t mess
              up the conversation with the client host. Example:

              spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) &
...
 
-- 

--Zdeněk Pytela, <letty na mrakoplas.phil.muni.cz>



Další informace o konferenci Linux