TCP will bypass the program

Source: Internet
Author: User
Tcp will preferentially read/etc/hosts. alow file, and then read/etc/hosts. in the deny file, allow has a higher priority than deny. for example, when hosts. the allow file contains the sshd: 192.168.0.8 entry, hosts. when the sshd: 192.168.0.8 entry also exists in deny, it takes effect in the allow file, that is...

 

Tcp preferentially reads the/etc/hosts. alow file and then the/etc/hosts. deny file.

Higher than deny

For example, if the hosts. allow file contains the sshd: 192.168.0.8 entry, hosts. deny also exists.

Sshd: 192.168.0.8 entry, which takes effect in the allow file, that is, the ip address 192.168.0.8.

You can access the local machine through the ssh service.

Check whether a service supports

Check whether a service supports tcp bypass:

Around:

Ldd/usr/sbin/sshd | grep libwrap. so

<= Only loaded

Only libwrap. so is loaded.

Module service support

Module services support tcp bypass

Will bypass

Ldd 'which vsftpd '| grep libwrap

Lsof/usr/lib/libwrap. so * (view the running super daemon). The xinetd service is

Tcp_wrappers is supported, that is, all services managed by xinetd support tcp_wrapers.

/Etc/hosts. allow

Eg1: in. telnetd: 192.168.0.254 192.168.0.253

<= The name of the control service must be

The name of the control service must be/

The service names under usr/sbin are consistent.

The service name under is the same

Eg2: sshd: 192.168.0.

Eg3: sshd: 192.168.0.

Eg4: sshd: 192.168.0.

Destination T 192.168.0.254

Deny: 192.168.0.254

<= Allow a CIDR block

Allow a CIDR block

<= Set

= 254 excluded

Excluded

<= Rejected in this CIDR block

Deny 254 in this CIDR block

This access

Access from this ip address

/Etc/hosts. deny

<= Description and

Statement and

Allow statements are basically the same.

The statement is basically the same.

ALL: ALL

Tracking access information:

<= Reject all

Reject all

Vi/etc/hosts. allow:

In. telnetd: 192.168.0.4: spawn echo 'date' from % c to % s | mail

Root-s warn

Or

In. telnetd: 192.168.0.4: spawn echo 'date' from % c to % s»

/Home/file

 

This article is from the "linux O & M" blog

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.