All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiann-Ming Su <sujiannming@gmail.com>
To: "netfilter@lists.netfilter.org" <netfilter@lists.netfilter.org>
Subject: Re: ip_conntrack_max vs ip_conntrack
Date: Tue, 19 Oct 2004 13:21:18 -0400	[thread overview]
Message-ID: <561dc32604101910213b360ff5@mail.gmail.com> (raw)
In-Reply-To: <561dc3260409301548488b387e@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

On Thu, 30 Sep 2004 18:48:16 -0400, Jiann-Ming Su <sujiannming@gmail.com> wrote:
> 
> There's some good info on what I was looking for at the end of this section:
> 
> http://www.iptables.org/documentation/HOWTO//packet-filtering-HOWTO-7.html#ss7.3
> 

In case someone, like myself, should look through the archives,
another good place for info is
http://iptables-tutorial.frozentux.net/iptables-tutorial.html.  I'm
also including a snapshot of the rules we use to firewall off the
dorms at an academic institution.  Someone else out there may find
this helpful.  All IP's have been changed to protect the guilty.

-- 
Jiann-Ming Su
"I have to decide between two equally frightening options.  
                                            If I wanted to do that,
I'd vote." --Duckman

[-- Attachment #2: iptables --]
[-- Type: application/octet-stream, Size: 3922 bytes --]

# Generated by iptables-save v1.2.9 on Thu Oct 14 15:16:17 2004
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
COMMIT
# Completed on Thu Oct 14 15:16:17 2004
# Generated by iptables-save v1.2.9 on Thu Oct 14 15:16:17 2004
*mangle
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed on Thu Oct 14 15:16:17 2004
# Generated by iptables-save v1.2.9 on Thu Oct 14 15:16:17 2004
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:FWD_SYN - [0:0]
:IN_ICMP - [0:0]
:IN_TCP - [0:0]
:IN_UDP - [0:0]
-A INPUT -i lo -j ACCEPT 
-A INPUT -p 89 -j ACCEPT 
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
-A INPUT -p udp -j IN_UDP 
-A INPUT -p tcp -m state --state NEW -j IN_TCP 
-A INPUT -p icmp -j IN_ICMP 
-A INPUT -j ULOG --ulog-prefix "iptables input cleanup: " 
-A FORWARD -d ! 192.168.0.0/255.255.0.0 -p tcp -m tcp -m multiport --dports 135,445 -j DROP 
-A FORWARD -i eth1 -p tcp -m multiport --dports 135,445 -j DROP 
-A FORWARD -i eth2 -p tcp -m tcp --tcp-flags SYN SYN -j FWD_SYN 
-A FORWARD -i eth2 -j ACCEPT 
-A FORWARD -p 47 -j ACCEPT 
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT 
-A FORWARD -s 192.168.0.0/255.255.0.0 -j ACCEPT 
-A FORWARD -s 10.0.0.0/255.255.0.0 -j ACCEPT 
-A FWD_SYN -p tcp -m tcp --tcp-flags FIN FIN -m limit --limit 10/min -j ULOG --ulog-prefix "iptables SYN/FIN attack" 
-A FWD_SYN -p tcp -m tcp --tcp-flags FIN FIN -j DROP 
-A FWD_SYN -p tcp -m tcp --dport 80 -m limit --limit 100/sec --limit-burst 200 -j ACCEPT 
-A FWD_SYN -p tcp -m tcp --dport 135 -m limit --limit 50/sec --limit-burst 50 -j ACCEPT 
-A FWD_SYN -p tcp -m tcp --dport 443 -m limit --limit 50/sec --limit-burst 50 -j ACCEPT 
-A FWD_SYN -p tcp -m tcp --dport 445 -m limit --limit 50/sec --limit-burst 50 -j ACCEPT 
-A FWD_SYN -p tcp -m tcp --dport 80 -m limit --limit 1/sec -j ULOG --ulog-prefix "iptables syn limit: " 
-A FWD_SYN -p tcp -m multiport --dports 135,443,445 -m limit --limit 10/min -j ULOG --ulog-prefix "iptables syn limit: " 
-A FWD_SYN -p tcp -m tcp -m multiport --dports 80,135,443,445 -j DROP 
-A FWD_SYN -p tcp -m tcp -m limit --limit 50/sec --limit-burst 50 -j ACCEPT 
-A FWD_SYN -p tcp -m tcp -m limit --limit 10/min -j ULOG --ulog-prefix "iptables syn limit: " 
-A FWD_SYN -j DROP 
-A IN_ICMP -s 10.0.9.30 -p icmp -j ACCEPT 
-A IN_ICMP -s 10.0.218.128/255.255.255.224 -p icmp -j ACCEPT 
-A IN_ICMP -s 10.0.246.0/255.255.254.0 -p icmp -j ACCEPT 
-A IN_ICMP -s 192.168.53.224/255.255.255.224 -p icmp -j ACCEPT 
-A IN_ICMP -j ULOG --ulog-prefix "iptables input icmp cleanup: " 
-A IN_ICMP -j DROP 
-A IN_TCP -s 192.168.99.36 -p tcp -m tcp --dport 22 -j ACCEPT 
-A IN_TCP -s 192.168.149.53 -p tcp -m tcp --dport 22 -j ACCEPT 
-A IN_TCP -s 192.168.99.35 -p tcp -m tcp --dport 22 -j ACCEPT 
-A IN_TCP -s 192.168.99.34 -p tcp -m tcp --dport 22 -j ACCEPT 
-A IN_TCP -s 192.168.68.111 -p tcp -m tcp --dport 22 -j ACCEPT 
-A IN_TCP -s 10.0.218.128/255.255.255.224 -p tcp -m tcp --dport 22 -j ACCEPT 
-A IN_TCP -s 10.0.246.0/255.255.254.0 -p tcp -m tcp --dport 22 -j ACCEPT 
-A IN_TCP -s 192.168.53.224/255.255.255.224 -p tcp -m tcp --dport 22 -j ACCEPT 
-A IN_TCP -s 10.0.246.0/255.255.254.0 -p tcp -m tcp --dport 10000 -j ACCEPT 
-A IN_TCP -s 10.0.254.144/255.255.255.240 -p tcp -m tcp --dport 10000 -j ACCEPT 
-A IN_TCP -j ULOG --ulog-prefix "iptables input tcp cleanup: " 
-A IN_TCP -j DROP 
-A IN_UDP -s 10.0.246.223 -p udp -m udp --dport 161 -j ACCEPT 
-A IN_UDP -s 10.0.9.30 -p udp -m udp --dport 161 -j ACCEPT 
-A IN_UDP -s 10.0.218.128/255.255.255.224 -p udp -m udp --dport 161 -j ACCEPT 
-A IN_UDP -s 10.0.246.63 -p udp -m udp --dport 161 -j ACCEPT 
-A IN_UDP -s 192.168.53.224/255.255.255.224 -p udp -m udp --dport 161 -j ACCEPT 
-A IN_UDP -j ULOG --ulog-prefix "iptables input udp cleanup: " 
-A IN_UDP -j DROP 
COMMIT
# Completed on Thu Oct 14 15:16:17 2004

  parent reply	other threads:[~2004-10-19 17:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-27 17:52 ip_conntrack_max vs ip_conntrack Jiann-Ming Su
2004-09-27 18:04 ` Jason Opperisano
2004-09-27 18:57 ` Jose Maria Lopez
2004-09-30 22:48   ` Jiann-Ming Su
2004-09-30 23:03     ` Jason Opperisano
2004-10-19 17:21     ` Jiann-Ming Su [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-09-24 22:34 Michal Ludvig
2004-09-24 22:49 ` Stephen J Smoogen
2004-09-30  9:59   ` Michal Ludvig
2004-09-28  7:59 ` Mohamed Eldesoky
2004-09-28 12:31   ` Alistair Tonner
2004-09-28 12:53     ` Ted Kaczmarek
2004-09-28 14:27   ` Jose Maria Lopez
2004-09-28 14:48     ` Mohamed Eldesoky
2004-09-28 15:19       ` Alistair Tonner
2004-09-30 11:30         ` Mohamed Eldesoky

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=561dc32604101910213b360ff5@mail.gmail.com \
    --to=sujiannming@gmail.com \
    --cc=netfilter@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.