When it comes to the management of the Linux system, flushing and listing are two of the most common firewall rules. The implementation of listing firewall rules is given below:
The basic command for listing the iptables rules across all chains is written in the standard format:
iptables -L
For more advanced conditions, like listing all rules with line numbers to reference specific rules, the command is modified:
iptables -L --line-numbers
The general command for listing the iptables rules can have multiple variations depending on what the user wants. The user can replace 'INPUT' with the name of the chain they want to inspect or modify:
iptables -L INPUT