Detailed description of iptables configuration file

Source: Internet
Author: User
RH/etc/sysconfig/iptables file, in the format generated by iptables-save. * Nat starts to process the nat table REROUTINGACCEPT [5278: 800028]. the default PREROUTING chain policy is ACCEPT (ACCEPT/allow), that is,-tnat-PPREROUTINGACCEPT. The reference count of this chain is in square brackets, that is, through the/etc/sysconfig/ IptablesFile, which is Iptables-Save format. * Nat starts to process nat tables.
Rerouting accept [5278: 800028] the default PREROUTING chain policy is ACCEPT (ACCEPT/allow), that is,-tnat-p prerouting accept. The reference count in square brackets refers to the reference count of the local chain. There are 5278 packets through the local chain, totaling 800028 bytes.
The default policy of the ostrouting accept [5278: 800028] POSTROUTING chain is ACCEPT, that is,-t nat-p postrouting accept.
: Output accept [5278: 800028]   The default OUTPUT chain policy is ACCEPT, that is,-t nat-p output accept.
QUOTE:
-A postrouting-s 192.168.0.0/255.255.255.0-o eth1-j SNAT -- to-source 61.133.202.70
Add an SNAT rule. the packet sent from eth1 to the network address 192.168.0.0/24 will be changed to 61.133.202.70.
COMMIT   The nat table processing is complete. the following parts do not belong to the nat table.
* Filter   Start processing the filter table
: INPUT ACCEPT   [5278: 800028]
: Forward accept [5278: 800028]
: Output accept [5278: 800028]
: RH-Firewall-1-INPUT [5278: 800028] defines a custom chain named RH-Firewall-1-INPUT
-A input-j RH-Firewall-1-INPUT all INPUT packets are forwarded to the RH-Firewall-1-INPUT chain for processing
-A forward-j RH-Firewall-1-INPUT all forwarded packets are forwarded to the RH-Firewall-1-INPUT chain for processing
-A RH-Firewall-1-INPUT-I lo-j ACCEPT adds rules in the RH-Firewall-1-INPUT chain to ACCEPT all packets that are in the local loopback interface
-A RH-Firewall-1-INPUT-I eth0-jACCEPT   Accept all data packets entered by the network interface eth0
-A RH-Firewall-1-INPUT-I eth1-jACCEPT   Accept all data packets entered by the network interface eth1
-A RH-Firewall-1-INPUT-p icmp-m icmp any-jACCEPT   Accept all ICMP packets
-A RH-Firewall-1-INPUT-p esp-j ACCEPT   Accept all IPSec ESP packets
-A RH-Firewall-1-INPUT-p ah-j ACCEPT   Accept all IPSec AH packets
-A RH-Firewall-1-INPUT-m state -- state RELATED, ESTABLISHED-jACCEPT   Accept all packets marked as RELATED or ESTABLISHED
-A RH-Firewall-1-INPUT-p tcp-m state -- state NEW-m tcp -- dport80-j ACCEPT   Accept all TCP new connection data packets whose destination port is 80
-A RH-Firewall-1-INPUT-p tcp-m state -- state NEW-m tcp -- dport21-j ACCEPT   Accept all TCP new connection data packets whose destination port is 21
-A RH-Firewall-1-INPUT-p tcp-m state -- state NEW-m tcp -- dport22-j ACCEPT   Accept all TCP new connection data packets whose destination port is 22
-A RH-Firewall-1-INPUT-j REJECT -- reject-withicmp-host-prohibited   All other data packets are rejected and responded with icmp-host-prohibited data packets.
COMMIT   Filter table processed
-A input-s 219.150.13.170-j DROP
-A input-s 220.115.251.1-j DROP
-A input-s 211.115.68.55-j DROP   In the filter table, the data packets whose source addresses are 219.150.13.170, 220.115.251.1, and 211.115.68.55 are discarded.
These three rows are manually added, not generated by iptables-save.

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.