All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rob Sterenborg" <rob@sterenborg.info>
To: netfilter@lists.netfilter.org
Subject: Re: Is this firewall good enough?
Date: Wed, 9 Jun 2004 11:56:03 +0200	[thread overview]
Message-ID: <001d01c44e07$fbc1b490$1201a8c0@admin> (raw)
In-Reply-To: 20040609081453.75751.qmail@web14704.mail.yahoo.com

> > > 7.  /sbin/iptables -A INPUT -p tcp --dport 53
> > --syn
> > > -j ACCEPT #DNS
> >
> > DNS uses udp for normal lookups. Only in special
> > cases tcp is used.
> >
> I noted --syn can only be used with protocol tcp. How
> do I write a similar rule to accept connections to udp
> port 53?

Packets with syn set are (almost ? someone please correct me if I'm
wrong) always in NEW state.
So, a similar rule would be :

iptables -A INPUT -p udp --dport 53 -j ACCEPT

which implies :

iptables -A INPUT -m state --state NEW -p udp \
  --dport 53 -j ACCEPT

> I don't see a good explanation of tcp-flags either on
> iptables man pages or Packet Filtering HOWTO. What are
> meaning of SYN,ACK,FIN,RST,URG,PSH? What combinations
> can be logged/dropped?

A little info I found about tcp flags :
http://www.whitehats.ca/main/members/Seeker/seeker_tcp_header/seeker_tcp_header.html
http://www.spirit.com/Network/net0900.html
http://www.securityfocus.com/infocus/1524
I don't think it's all that you want to know about it but it's as much
as I could find right now.
Not sure what URG and PSH really do.

You could DROP :
- SYN,FIN SYN,FIN (Both SYN and FIN set in 1 packet.)
- SYN,RST SYN,RST (SYN and RST set, probably a scan)
- Anybody any additions, comments ?


Gr,
Rob



  reply	other threads:[~2004-06-09  9:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-08  9:14 Is this firewall good enough? Sagara Wijetunga
2004-06-08  9:42 ` Feizhou
2004-06-08  9:57   ` Antony Stone
2004-06-08 15:03     ` Feizhou
2004-06-08 15:23       ` Antony Stone
2004-06-08 20:11         ` Feizhou
2004-06-09  9:48           ` Antony Stone
2004-06-09 10:03             ` Feizhou
2004-06-08 16:17       ` David Cannings
2004-06-08 20:14         ` Feizhou
2004-06-09  9:28           ` Jozsef Kadlecsik
2004-06-09  9:57             ` Feizhou
2004-06-09 11:05               ` Jozsef Kadlecsik
2004-06-09 13:18                 ` Feizhou
2004-06-09 13:23                 ` Feizhou
2004-06-09  8:36       ` Sagara Wijetunga
2004-06-08  9:44 ` Rob Sterenborg
2004-06-09  8:14   ` Sagara Wijetunga
2004-06-09  9:56     ` Rob Sterenborg [this message]
2004-06-09 15:12     ` Aleksandar Milivojevic
2004-06-09 15:15       ` Aleksandar Milivojevic
2004-06-11 14:24         ` Sagara Wijetunga
2004-06-08  9:55 ` Antony Stone
2004-06-08 12:38 ` Chris Brenton
2004-06-09  7:32   ` Sagara Wijetunga
2004-06-09 13:47     ` Chris Brenton

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='001d01c44e07$fbc1b490$1201a8c0@admin' \
    --to=rob@sterenborg.info \
    --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.