View and clear iptables rules in Ubuntu, and view and clear ubuntuiptables

Source: Internet
Author: User

View and clear iptables rules in Ubuntu, and view and clear ubuntuiptables

The system does not support service iptables restart and service iptables status. How can I view and clear iptable rules?

1. view basic syntax in iptables

Iptables [-t tables] [-L] [-nv] Options and parameters:-t: Followed by a table, such as nat or filter. If this parameter is omitted, use the default filter-L: to list the current table rules-n: do not check the IP address and HOSTNAME, the display speed is much faster. -V: lists more information, including the total number of data packets and related network interfaces. 2. View applications using iptablesTarget: a rule that lists the three links of a filter table. target indicates the operation performed, ACCEPT indicates allow, and REJECT indicates deny. In addition, DROP indicates discard. Prot: indicates the data packet protocol used. It mainly includes TCP, UDP, and ICMP3 data packet formats. Opt: additional options. Source: the source IP address to which the rule applies. Destination: Specifies the target to which the rule applies. Three iptable-save syntaxIptables-save [-t table] Options and parameters:-t: Can be output for certain data tables, such as NAT or Filter. This command will list all firewall rules 4. iptable-save ApplicationList filter table rules
5. Clear iptables syntaxIptables [-t tables] [-FXZ] Options and parameters:-F: Clear all formulated rules-X: Clear all user-defined chain-Z: returns the count and traffic statistics of all chains to zero. 6. Clear iptables applications


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.