iptables Bastille not blocking

Discussion in 'General' started by wpwood3, Jan 27, 2008.

  1. wpwood3

    wpwood3 New Member

    I'm trying do some local testing with iptables and am having a problem...

    My ISPConfig server is on
    My laptop is on

    I want to block all access from my laptop to my ISPConfig server.

    I entered these commands on my ISPConfig server:
    iptables -A INPUT -s -j DROP
    iptables -A OUTPUT -d -j DROP
    When I do "iptables -L" I can clearly see the new rules are there.

    The problem is that I can still access the server from my laptop. iptables is not blocking anything.
    What am I missing?
  2. wpwood3

    wpwood3 New Member

    I figured it out...

    You have to use -I instead of -A
    Like this:
    iptables -I INPUT -s -j DROP
    iptables -I OUTPUT -d -j DROP
    Using -I puts the rule at the top of the list so it gets processed first and cannot be overridden by later rules.

Share This Page