Securing and Optimizing Linux: RedHat Edition -A Hands on Guide | ||
---|---|---|
Prev | Chapter 12. Networking Firewall -Masquerading and Forwarding | Next |
The commands listed below are some tools that we use often, but many more exist, and you should check the man page and documentation for more details and information. The ipchains tool is used for the firewall administration of the Linux system. We can use it to set up a firewall rules file, as we are doing in this book. Once firewall rules have been created we can play with its many commands to maintain, and inspect its rules in the Linux kernel.
To list all rules in the selected chain, use the command:
[root@deep] /# ipchains -L |
To list all input rules in the selected chain, use the command:
[root@deep] /# ipchains -L input |
To list all output rules in the selected chain, use the command:
[root@deep] /# ipchains -L output |
To list all forward rules in the selected chain, use the command:
[root@deep] /# ipchains -L forward |
To list all masquerades rules in the selected chain, use the command:
[root@deep] /# ipchains -ML |
To list all rules in numeric output in the selected chain, use the command:
[root@deep] /# ipchains -nL |