* Iptables don't block traffic
@ 2004-04-22 13:53 Oscar Arranz
2004-04-22 14:46 ` Antony Stone
2004-04-22 14:47 ` Andrew Schulman
0 siblings, 2 replies; 5+ messages in thread
From: Oscar Arranz @ 2004-04-22 13:53 UTC (permalink / raw)
To: netfilter
Hi all, this is my first message to the list, so excuse me if it is too
trivial...
I have a Red Hat box running as a firewall in my network. It's
working fine, but now I'm doing tests in order to block certain Internet
traffic. I've added the following rules which should drop packets from
my PC to a known public IP (a web server):
iptables -A FORWARD -s 192.138.35.110 -d 193.110.128.200 -j DROP
But the packets are not droped because I still can connect to the
web server.
The default rule for FORWARD chain is DROP
Any ideas?
Thanks,
Oscar
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Iptables don't block traffic
2004-04-22 13:53 Iptables don't block traffic Oscar Arranz
@ 2004-04-22 14:46 ` Antony Stone
2004-04-22 17:03 ` Oscar Arranz
2004-04-22 14:47 ` Andrew Schulman
1 sibling, 1 reply; 5+ messages in thread
From: Antony Stone @ 2004-04-22 14:46 UTC (permalink / raw)
To: netfilter
On Thursday 22 April 2004 2:53 pm, Oscar Arranz wrote:
> I have a Red Hat box running as a firewall in my network. It's
> working fine, but now I'm doing tests in order to block certain Internet
> traffic. I've added the following rules which should drop packets from
> my PC to a known public IP (a web server):
>
> iptables -A FORWARD -s 192.138.35.110 -d 193.110.128.200 -j DROP
>
> But the packets are not droped because I still can connect to the
> web server.
>
> The default rule for FORWARD chain is DROP
>
> Any ideas?
You say you have added the above rule.
But, what have you added it *to*?
In other words, what other rules do you also have running on the machine?
That information would help us greatly in answering your question.
Regards,
Antony
--
Bill Gates has personally assured the Spanish Academy that he will never allow
the upside-down question mark to disappear from Microsoft word-processing
programs, which must be reassuring for millions of Spanish-speaking people,
though just a piddling afterthought as far as he's concerned.
- Lynne Truss, "Eats, Shoots and Leaves"
Please reply to the list;
please don't CC me.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Iptables don't block traffic
2004-04-22 13:53 Iptables don't block traffic Oscar Arranz
2004-04-22 14:46 ` Antony Stone
@ 2004-04-22 14:47 ` Andrew Schulman
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Schulman @ 2004-04-22 14:47 UTC (permalink / raw)
To: netfilter-wool9L35kiczKOhml7GhPkB+6BGkLq7r
> Hi all, this is my first message to the list, so excuse me if it is
too
> trivial...
>
> I have a Red Hat box running as a firewall in my network. It's
> working fine, but now I'm doing tests in order to block certain Internet
> traffic. I've added the following rules which should drop packets from
> my PC to a known public IP (a web server):
>
> iptables -A FORWARD -s 192.138.35.110 -d 193.110.128.200 -j DROP
>
> But the packets are not droped because I still can connect to the
> web server.
Look at your whole FORWARD chain: 'iptables -v -L FORWARD'. You have an
earlier rule in the chain that's allowing those packets through.
If you want to be sure, try replacing '-A' by '-I'. This will insert
your rule at the front of the FORWARD chain, instead of at the end.
> The default rule for FORWARD chain is DROP
This confirms it. If you didn't have an earlier rule that was letting
the packets through, then with a DROP policy you wouldn't need the above
rule at all.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Iptables don't block traffic
2004-04-22 14:46 ` Antony Stone
@ 2004-04-22 17:03 ` Oscar Arranz
2004-04-22 17:13 ` Rob Sterenborg
0 siblings, 1 reply; 5+ messages in thread
From: Oscar Arranz @ 2004-04-22 17:03 UTC (permalink / raw)
To: netfilter
[-- Attachment #1: Type: text/html, Size: 1425 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Iptables don't block traffic
2004-04-22 17:03 ` Oscar Arranz
@ 2004-04-22 17:13 ` Rob Sterenborg
0 siblings, 0 replies; 5+ messages in thread
From: Rob Sterenborg @ 2004-04-22 17:13 UTC (permalink / raw)
To: netfilter
> OK, I saw the problem. The default for FORWARD chain is
> another chain called block and its rules don't block this traffic.
Well, ehm, not really.
The policy DROP for the chain means that all traffic that doesn't get
ACCEPTed, REJECTed (or whatever) by one of your rules is DROPped.
Do you have another rule in the chain the ACCEPT's this traffic, before it
reaches your DROP rule ?
Because then the packets are accepted before the ever reach the DROP chain.
Gr,
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-04-22 17:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-22 13:53 Iptables don't block traffic Oscar Arranz
2004-04-22 14:46 ` Antony Stone
2004-04-22 17:03 ` Oscar Arranz
2004-04-22 17:13 ` Rob Sterenborg
2004-04-22 14:47 ` Andrew Schulman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox