Hosts. allow and hosts. deny problems ..

Source: Internet
Author: User
Hosts. allow and hosts. deny problems .. -- Linux general technology-Linux technology and application information. For details, refer to the following section. [I = s] This post was last edited by talent

Hosts. allow content:
ALL: 127.0.0.1
ALL: 192.168.0.2
ALL: 123.456.78.9 # Internet IP address to be accessed

Hosts. deny content:
ALL: deny


Linux corresponds to the Intranet IP address 192.168.0.3 under the company's vro.
The corresponding IP address of the windows computer under this vro: 192.168.0.2 can be accessed through SSH.
However, the home computer cannot be accessed through SSH. The corresponding public IP address is 123.456.78.9.
The home computer is also under a vro, corresponding to the Intranet IP Address: 192.168.1.100

Q: Why is my computer inaccessible?
==============
I have solved this problem and need to restart the service to take effect.
Service xinetd restart
================================
The new question is: If I only want to allow access from the 123.456.78.9 IP address when iptables blocks access, how can I restrict access from other IP addresses?

Iptables-I INPUT-s! 127.0.0.1-j DROP
After this is done, check iptables-L for all the settings.
The result is as follows:
DROP all -- webfwd-caprica.easydns.com anywhere

==========
In addition, I do not understand how to set IP segments.
Why is there such a result?
[Root @ aa ~] # Iptables-I INPUT-s 192.168.2.0/24-j ACCEPT

Will all IP addresses of 192.168.2.1-192.168.2.255 be displayed?
If I only want the IP address 192.168.2.10-192.168.2.20 on the screen, how can I set it?

Thank you!
Related Article

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.