RedHat firewall settings

Source: Internet
Author: User

Edit the file:/etc/sysconfig/iptables

The file content is as follows:

* Filter
: Input accept [0: 0]
: Forward accept [0: 0]
: Output accept [0: 0]
: RH-Firewall-1-INPUT-[0: 0]
-A input-J RH-Firewall-1-INPUT
-A forward-J RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT-I lo-J accept
-A RH-Firewall-1-INPUT-p icmp -- ICMP-type any-J accept
-An RH-Firewall-1-INPUT-P 50-J accept
-An RH-Firewall-1-INPUT-P 51-J accept
-A RH-Firewall-1-INPUT-p udp -- dport 5353-D 224.0.0.20.- J accept
-A RH-Firewall-1-INPUT-p udp-m udp -- dport 631-J accept
-A RH-Firewall-1-INPUT-p tcp-m tcp -- dport 631-J accept
-A RH-Firewall-1-INPUT-M state -- State established, related-J accept
-A RH-Firewall-1-INPUT-M state -- state new-m tcp-p tcp -- dport 389-J accept
-A RH-Firewall-1-INPUT-M state -- state new-m tcp-p tcp -- dport 22-J accept
-A RH-Firewall-1-INPUT-J reject -- reject-with ICMP-host-prohibited
Commit

When a new rule is specified, add the rule according to the preceding content.

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.