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

ExpressionMeaning
iptables -LList all rules in the selected chain
iptables -t nat -n -LList all NAT rules
iptables -L -n --line-numbersList all rules including their line number
iptables -FDelete existing rules
iptables -D INPUT 2Delete the second rule in the INPUT chain
iptables -t nat -D PREROUTING 2Delete the second rule in the NAT table
iptables -A INPUT -s "<ip address>" -j DROPBlock a specific IP address
iptables -A INPUT -p tcp --dport 80 -m limit --limit 25/minute --limit-burst 100 -j ACCEPTLimit connections to 25 per minute on port 80, after 100 connections have been reached
iptables -N MYCHAINCreate a new chain called "MYCHAIN"
An error has occurred. This application may no longer respond until reloaded. Reload 🗙