netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Feldmann <feldmann_markus@gmx.de>
To: netfilter@vger.kernel.org
Subject: Re: iptables NEW or SYN
Date: Thu, 13 May 2010 19:42:28 +0200	[thread overview]
Message-ID: <hshdm4$dfr$1@dough.gmane.org> (raw)
In-Reply-To: <alpine.LSU.2.01.1005131916320.9398@obet.zrqbmnf.qr>

Ok i post some important rules, but i think nobody will watch this:




1.        iptables -N attacksinput
2.        iptables -A INPUT -i "$DSLIF" -j attacksinput
3.        iptables -A attacksinput -m state --state ESTABLISHED,RELATED 
-j RETURN
4.        iptables -A attacksinput -m recent --rcheck -m hashlimit 
--hashlimit-name attacksinput_bl --hashlimit-upto 6/hour 
--hashlimit-burst 20 --hashlimit-mode srcip -j LOG --log-level info 
--log-prefix "attacksinput(bl): "
5.        iptables -A attacksinput -m recent --update --seconds 600 -j DROP
6.        iptables -A attacksinput -p tcp -m state --state NEW -m 
multiport --dports 1:79,81:442,444:65535 -m hashlimit --hashlimit-name 
attacksinputnot_80 --hashlimit-upto 6/hour --hashlimit-burst 20 
--hashlimit-mode srcip -j LOG --log-level info --log-prefix 
"attacksinput(!80): "
7.        iptables -A attacksinput -p tcp -m state --state NEW -m 
multiport --dports 1:79,81:442,444:65535 -m recent --set -j DROP
8.        iptables -A attacksinput -p tcp -m state --state NEW -m 
hashlimit --hashlimit-name http --hashlimit-upto 6/hour 
--hashlimit-burst 20 --hashlimit-mode srcip --dport 80 -j RETURN
9.        iptables -A attacksinput -p tcp -m state --state NEW -m 
hashlimit --hashlimit-name https --hashlimit-upto 6/hour 
--hashlimit-burst 20 --hashlimit-mode srcip --dport 443 -j RETURN
10.       iptables -A attacksinput -p icmp --icmp-type 8 -j RETURN
11.       iptables -A attacksinput -m state --state NEW,INVALID -m 
hashlimit --hashlimit-name attacksinput_new_inv --hashlimit-upto 6/hour 
--hashlimit-burst 20 --hashlimit-mode srcip -j LOG --log-level info 
--log-prefix "attacksinput(NEW,INVALID): "
12.       iptables -A attacksinput -m state --state NEW,INVALID -m 
recent --set -j DROP
13.       iptables -A attacksinput -m hashlimit --hashlimit-name 
attacksinput_rest --hashlimit-upto 6/hour --hashlimit-burst 20 
--hashlimit-mode srcip -j LOG --log-level info --log-prefix "attacksinput: "
14.       iptables -A attacksinput -m recent --set -j DROP





Description:
All Packets from the Internet, which comes over ppp0 and want to go into 
my Apache-Server, goes into the chain "attacksinput". Only connections 
to port 80 and 443 are valid and RETURN to the mein chain, all other 
will be logged and dropped.

I friend tried to connect to my server, but couldnt establish a 
connection, here is the log:
https://debianforum.de/forum/pastebin.php?mode=view&s=34615

His computer tries several times to connect, but it fails. The first 
tries send the SYN Flag. Normaly it should be catched by my rule 9 but 
it would catched by the rule 11.

Any idea ?

Regards Markus


  reply	other threads:[~2010-05-13 17:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-13 17:08 iptables NEW or SYN Markus Feldmann
2010-05-13 17:18 ` Jan Engelhardt
2010-05-13 17:42   ` Markus Feldmann [this message]
2010-05-13 18:00   ` Markus Feldmann
2010-05-13 18:09     ` Markus Feldmann
2010-05-13 20:09       ` Pascal Hambourg
2010-05-13 20:55         ` Markus Feldmann
2010-05-13 18:05   ` Markus Feldmann
2010-05-13 18:19     ` Curby
2010-05-13 18:45       ` Markus Feldmann
2010-05-13 19:23         ` Mistick Levi
2010-05-13 21:45           ` Markus Feldmann
2010-05-13 22:46             ` Curby
2010-05-14  0:06           ` Markus Feldmann
2010-05-14  0:23             ` Markus Feldmann
2010-05-14  2:19             ` Markus Feldmann
2010-05-14  6:41             ` Jan Engelhardt
2010-05-14 12:16               ` Markus Feldmann
2010-05-14  5:08         ` Mart Frauenlob
     [not found] <hsgu5c$d8c$1@dough.gmane.org>
2010-05-13 15:21 ` ratheesh k

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='hshdm4$dfr$1@dough.gmane.org' \
    --to=feldmann_markus@gmx.de \
    --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;
as well as URLs for NNTP newsgroup(s).