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