IPTables Rule Generator
IPTables Rule Generator is a small tool which will help you generate simple iptables rules for your Linux server. If you are looking for a more advance systax, take a look at iptables documentation.
Examples
| Expression | Meaning |
| iptables -L | List all rules in the selected chain |
| iptables -t nat -n -L | List all NAT rules |
| iptables -L -n --line-numbers | List all rules including their line number |
| iptables -F | Delete existing rules |
| iptables -D INPUT 2 | Delete the second rule in the INPUT chain |
| iptables -t nat -D PREROUTING 2 | Delete the second rule in the NAT table |
| iptables -A INPUT -s "<ip address>" -j DROP | Block a specific IP address |
| iptables -A INPUT -p tcp --dport 80 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT | Limit connections to 25 per minute on port 80, after 100 connections have been reached |
| iptables -N MYCHAIN | Create a new chain called "MYCHAIN" |