Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of default iptable rules for centos 6.6

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail the example analysis of the default iptable rules of centos 6.6. the editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

I installed a new centos6.6 virtual machine on my computer, then installed nginx without any other settings, and then found that you can only access nginx on centos. I took a look at the rules of iptable.

[root@centos6 ~] # iptables-save

# Generated by iptables-save v1.4.7 on Sun Jul 26 15:53:13 2015

* filter

: INPUT ACCEPT [0:0]

: FORWARD ACCEPT [0:0]

: OUTPUT ACCEPT [5819:366868]

-An INPUT-m state-- state RELATED,ESTABLISHED-j ACCEPT

-An INPUT-p icmp-j ACCEPT

-An INPUT-I lo-j ACCEPT

-An INPUT-p tcp-m state-- state NEW-m tcp-- dport 22-j ACCEPT

-An INPUT-j REJECT-- reject-with icmp-host-prohibited

-A FORWARD-j REJECT-- reject-with icmp-host-prohibited

COMMIT

# Completed on Sun Jul 26 15:53:13 2015

There seems to be no problem, ah, the default strategy is also accepted, see the last two sentences, do not understand what it means, searched the original

-An INPUT-j REJECT-- reject-with icmp-host-prohibited

-A FORWARD-j REJECT-- reject-with icmp-host-prohibited

These two items mean to reject all other packets in the INPUT table and the FORWARD table that do not meet any of the above rules. And send a host prohibited message to the rejected host.

Url=1bwvdaSb6sKL_FzefyzVFd5GYoZOE4LMNiSG6Oe4WTGQb4ygdzWXVAlitJqLqQcjG1Zwg_xC1_6-Iflwq69il_

This is the end of this article on "sample Analysis of centos 6.6 default iptable rules". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report