Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Rob Sterenborg" <rob@sterenborg.info>
To: netfilter@vger.kernel.org
Subject: RE: iptables not prevent access
Date: Mon, 15 Sep 2008 09:33:43 +0200	[thread overview]
Message-ID: <9518B26607784D55A361431633134C9B@dcyb.net> (raw)
In-Reply-To: <D8C9BC7FFCF8154FB7141EB8DB609C1721725A3FD3@SGPAPHQ-EXSCC01.dc01.fujixerox.net>

netfilter-owner@vger.kernel.org <> wrote on :

> Hi, all:
> 
> I am running the command "iptables -p tcp -j REJECT -A INPUT
> -i eth0 -s 13.121.8.119/32 --dport 80", to reject http access
> from the host "13.121.8.119". The command returns without any
> error message. However, I still can acess the linux server from
> "13.121.8.119". 
> 
> Anything goes wrong here?

Is there a rule that would accept the http packet before it would hit this
rule?

> Any method to debug?

Place a LOG rule identical to the REJECT rule in front of it and look in
your messages log if it hits:

$ipt -A INPUT -i eth0 -s 13.121.8.119 -p tcp --dport 80 -j LOG \
  --log-level info --log-prefix "IPT: TEST: "
$ipt -A INPUT -i eth0 -s 13.121.8.119 -p tcp --dport 80 -j REJECT

If it doesn't hit, either the rule is incorrect (for what you want it to do)
or another rule has already accepted the packet.


Grts,
Rob


  reply	other threads:[~2008-09-15  7:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-15  7:02 iptables not prevent access Xu, Qiang (FXSGSC)
2008-09-15  7:33 ` Rob Sterenborg [this message]
2008-09-15  7:53   ` Xu, Qiang (FXSGSC)
2008-09-15 10:42     ` Vimal
2008-09-15 11:14       ` Xu, Qiang (FXSGSC)
2008-09-15 11:26         ` Simon Gray
2008-09-16  1:36           ` Xu, Qiang (FXSGSC)
2008-09-16  1:49             ` Vimal
2008-09-15 12:06         ` Vimal
2008-09-16  1:56           ` Xu, Qiang (FXSGSC)
     [not found]       ` <D8C9BC7FFCF8154FB7141EB8DB609C1721726062EC@SGPAPHQ-EXSCC01.dc01.fujixerox.net>
2008-09-15 12:11         ` Vimal
2008-09-16  3:45           ` Xu, Qiang (FXSGSC)
2008-09-16  3:52             ` Vimal
2008-09-16  4:14               ` Xu, Qiang (FXSGSC)
2008-09-16  7:28           ` Xu, Qiang (FXSGSC)
2008-09-15 10:44     ` Rob Sterenborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9518B26607784D55A361431633134C9B@dcyb.net \
    --to=rob@sterenborg.info \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox