Child pages
  • blocking and ip with iptables
Skip to end of metadata
Go to start of metadata

In the event you need to block an IP from connection in any fashion using iptables, here's the steps

  1. user@host: iptables -A INPUT -s offendinghost -j DROP
  2. user@host: iptables-save > /etc/

The second step if enabled on the system will allow they system to automatically reload the iptables rules after a reboot

If the automatic rule reloading isnt enabled already, here's how to do that
in /etc/network/interfaces

under either the last interface to be brought up, or the last interface mentioned in your iptables rules place the following:
-- snip --
pre-up iptables-restore < /etc/
-- snip --

  • No labels