Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

2.5.2.2.3. Shell Commands
Option fields allow access rules to launch shell commands through the following two directives:
  • spawn — Launches a shell command as a child process. This directive can perform tasks like using /usr/sbin/safe_finger to get more information about the requesting client or create special log files using the echo command.
    In the following example, clients attempting to access Telnet services from the example.com domain are quietly logged to a special file:
    in.telnetd : .example.com \
    	: spawn /bin/echo `/bin/date` from %h>>/var/log/telnet.log \
    	: allow
    
  • twist — Replaces the requested service with the specified command. This directive is often used to set up traps for intruders (also called "honey pots"). It can also be used to send messages to connecting clients. The twist directive must occur at the end of the rule line.
    In the following example, clients attempting to access FTP services from the example.com domain are sent a message using the echo command:
    vsftpd : .example.com \
    	: twist /bin/echo "421 This domain has been black-listed. Access denied!"
    
For more information about shell command options, refer to the hosts_options man page.

 
 
  Published under the terms of the Open Publication License Design by Interspire