1. Home
  2. Security Hardening
  3. IPTables
  4. Create Default Blocks with IPTables

Create Default Blocks with IPTables

If you are configuring IPTables (or any firewall for that matter), you should always start with a block all rule. Within IPTables, it is very easy to do:

/sbin/iptables -I INPUT -j DROP -m comment --comment "Blocking all traffic by default"

This simple rule will block all communication to the server so be sure to create a whitelist for yourself as well. The last thing you want to do is block all traffic, including yourself. 🙂

This approach help set you into a security mindset and forces you to create a whitelist model for access. Changing your mindset goes a long way to ensuring a secure environment for your server.

Updated on December 13, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Email: support@noc.org

Leave a Comment