Created
May 19, 2018 08:16
-
-
Save yagosys/09ba153b6a64be4a761d10e50d01e962 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You might also want to log all the dropped packets. These rules should be at the bottom. | |
| First, create a new chain called LOGGING. | |
| iptables -N LOGGING | |
| Next, make sure all the remaining incoming connections jump to the LOGGING chain as shown below. | |
| iptables -A INPUT -j LOGGING | |
| Next, log these packets by specifying a custom “log-prefix”. | |
| iptables -A LOGGING -m limit --limit 2/min -j LOG --log-prefix "IPTables Packet Dropped: " --log-level 7 | |
| Finally, drop these packets. | |
| iptables -A LOGGING -j DROP |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
iptables -nvL -t nat