Skip to contentSkip to conversation

Dropping connections

DISCUSSION Ben Prince 3 participants 3 messages Dec 25, 2003 – Jan 2, 2004

lore
Share & tools
lore

Ben Prince

author
#0 lore raw

Hello All,

I am running Redhat 7.3 and installed iptables from the iptables-1.2.5-3.i386.rpm found on ftp.redhat.com . The problem I am having is that I can't seem to DROP connections at all.

I am using the following syntax

$IPTABLES -A INPUT -s ip.address.he.re -j DROP

Did I just newb something up somewhere? Any help at all?

Thanks in advance,

Ben Prince
Cyber Pixels
Systems Administrator
[email protected]

#1 lore raw
Quoted 9 lines · Ben Prince

Hello All,

I am running Redhat 7.3 and installed iptables from the iptables-1.2.5-3.i386.rpm found on ftp.redhat.com . The problem I am having is that I can't seem to DROP connections at all.

I am using the following syntax

$IPTABLES -A INPUT -s ip.address.he.re -j DROP

Tell us what the rest of your ruleset is, and what connection you are trying to block (ie how are you testiung it and deciding it doesn't work?).

Let's just clarify one thing to begin with - since this rule is in the INPUT chain, you *are* trying to block a connection to the machine running netfilter / iptables, and not a connection being routed through to somewhere else (for which you should use the FORWARD chain), yes?

Regards,

Antony.

Signature · 5 lines
If builders made buildings the way programmers write programs, then the first 
woodpecker to come along would destroy civilisation.

                                                     Please reply to the list;
                                                           please don't CC me.
#2 lore raw
In reply to Ben Prince
Quoted 7 lines · Ben Prince

I am running Redhat 7.3 and installed iptables from the iptables-1.2.5-3.i386.rpm found on ftp.redhat.com . The problem I am having is that I can't seem to DROP connections at all.

I am using the following syntax

$IPTABLES -A INPUT -s ip.address.he.re -j DROP

This should drop connections destined for the machine running iptables, if it is a router you will need to drop the packets in the forward chain.

Also the order of the rules matters, if you have an ACCEPT before the DROP then that will match first.

tcpdump is very useful for debugging. You can also add a log rule at the top iptables -I will insert at the top...

Signature · 2 lines
Andy Loukes
http://www.navaho.co.uk				Complete Appliance Technology