Linux Firewall Iptables entry notes

Source: Internet
Author: User

Linux Firewall IptablesAs follows:

1. iptables-h prints the help information of the iptables command. With this help, it is much easier to configure it.

2. iptables-L -- line-numbers prints all the rules in the filter table and marks the rules with numbers.

3. When adding rules, the filter table is used by default, the filter table has INPUT, FORWARD, OUTPUT, RH-Firewall-1-INPUT4 chain

4. In the filter table, the chain RH-Firewall-1-INPUT is unique to the RedHat system. When you configure the firewall with a graphical interface, the chain is actually edited, when you print out all the rules of the filter table using the iptables-L command, you can find that the first rule of the INPUT chain is the RH-Firewall-1-INPUT, that is, the INPUT calls the RH-Firewall-1-INPUT, it should be noted that the last rule of the RH-Firewall-1-INPUT is all the access to the reject, so if we add (that is, using the-A parameter) A allowed rule in the INPUT, this is useless, because the previous reject has all accesses, the-I parameter must be used when adding rules to INPUT.

5. The modification to the rule takes effect immediately, but it is not saved. You can use service iptables save to save it to the default position/etc/sysconfig/iptables. You can also use iptables-save>/tmp/iptables. new saves the firewall rules to/tmp or to other places, and then uses iptables-restore </tmp/iptables. new load the firewall rule file iptables under/tmp. new

Through the article, we can clearly learn the main knowledge of Linux Firewall Iptables and hope to help you!

  • Linux Iptables syntax
  • Use iptables for static IP ing
  • How to map all the Internet ports of iptables to a host on the Intranet
  • Configure the Linux kernel and use iptables for port ing
  • Specific iptables port ing operations
  • Use iptables for address ing
  • Clear all iptables rules in linux

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.