分类: LINUX
2011-05-11 09:34:10
by kangsun on Feb.10, 2010, under Linux_RedHat
Tcp_Wrappers is used for firewall setting with RHEL 5, here we discuss two option spawn,twist’s usage and different
1、daemon list :client list :spawn command
executes command in a child process
default I/O is connected to /dev/null
//exmaple: allow user1 to access your ends by telnet, after I/O connected,spawn would write control in log,
# vim /etc/hosts.allow
in.telnetd:ALL:spawn /bin/echo `data` %h >>/var/log/telnet
2、deamon list : client list:twist command
server is replaced by command
default I/O is connect to client
Example:
# vim /etc/hosts.deny
vsftpd:192.168.0.:twist /bin/echo “421 connection prohibited.”
//when user from 192.168.0.0/24 access via vsftp,system would execute /bin/echo, than deny access
ps:you can use spwan (action1) | (action2) : twist (action3) to set up。