TCP Wrapper < Memo >

Source: Internet
Author: User

To see if the SSH service supports Tcpwrapper:

ldd ' which-a sshd ' | grep Wrap


Configuration file:/etc/hosts.allow; /etc/hosts.deny

1. Record log:

Modify/etc/hosts.deny:

Sshd:172.16.20.211:severity Warning #定义日志的级别为warning

Modify/etc/rsyslog.conf:

Authpriv.warning/var/log/warning

Restart Service:

/etc/init.d/rsyslog restart


2. Execute an Order:

Sshd:172.16.20.211:spawn/bin/echo ' Date '%c%d >>/var/log/warning

#重定向追加到/var/log/warning file,%c is the logged-on user's information,%d is the service's process name


3, the output content to the terminal of the client:

Vsftpd:172.16.20.211:twist/bin/echo "refused to login from bloke."


4, before the connection display banner

Vsftpd:172.16.20.211:banners/var/banners/vsftpd

#此处文件名必须和服务名一致

Contents of the/var/banners/vsftpd file:

220- This is a test

220- This is B test

220- This is C test


All above can be found through man Hosts_deny and hosts_options.

TCP Wrapper < Memo >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.