Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Roy Sigurd Karlsbakk <roy@karlsbakk.net>
To: Antony Stone <Antony@Soft-Solutions.co.uk>,
	Netfilter mailinglist <netfilter@lists.netfilter.org>
Subject: Re: RELATED emulation without ip_conntrack
Date: Thu, 24 Oct 2002 12:45:52 +0200	[thread overview]
Message-ID: <200210241245.52685.roy@karlsbakk.net> (raw)
In-Reply-To: <200210231518.g9NFI4L02942@vulcan.rissington.net>

On Wednesday 23 October 2002 17:17, Antony Stone wrote:
> On Wednesday 23 October 2002 3:02 pm, Roy Sigurd Karlsbakk wrote:
> > hi
> >
> > I've got this video server streaming @ ~250Mbps, so I really don't want
> > to waste cpu cycles on ip_conntrack.
> >
> > how can I test for tcp flags to allow me to do a poor-man's-conntrack?
>
> Treat packets with SYN set, and ACK, FIN and RST clear as NEW connections.
> Treat packets with SYN and ACK set, FIN and RST clear as NEW replies.
> Treat packets with ACK set, SYN, FIN and RST clear as ESTABLISHED
> connections.
> Treat packets with FIN or RST set (probably ACK too) as terminating
> connections.

ok. My system has a private network and a public network. the private is open 
to everyone connected on it. The public is open only to the video service 
(tcp/1234) and icmp. Does the following look reasonable?

iptables -I INPUT -i eth0 -j ACCEPT
iptables -I INPUT -i eth1 -p icmp -j ACCEPT
iptables -I INPUT -i eth1 -p tcp --dport 1234 --tcp-flags SYN,ACK,FIN,RST \
	SYN -j ACCEPT
iptables -I INPUT -i eth1 -p tcp --dport 1234 --tcp-flags SYN,ACK,FIN,RST \
	SYN ACK -j ACCEPT
iptables -I INPUT -i eth1 -p tcp --dport 1234 --tcp-flags SYN,ACK,FIN,RST \
	FIN,RST -j ACCEPT
iptables -I INPUT -i eth1 -p tcp --dport 1234 --tcp-flags SYN,ACK,FIN,RST \
	ACK,FIN,RST -j ACCEPT
iptables -I INPUT -j LOG --log-prefix "Illegal packet" --limit 5/second \
	--limit-burst 10
iptables -I INPUT -j DROP

-- 
Roy Sigurd Karlsbakk, Datavaktmester
ProntoTV AS - http://www.pronto.tv/
Tel: +47 9801 3356

Computers are like air conditioners.
They stop working when you open Windows.



  reply	other threads:[~2002-10-24 10:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-23 14:02 RELATED emulation without ip_conntrack Roy Sigurd Karlsbakk
2002-10-23 15:17 ` Antony Stone
2002-10-24 10:45   ` Roy Sigurd Karlsbakk [this message]
2002-10-24 11:55     ` Antony Stone
2002-10-24 18:17       ` poptop connection problem Sundaram Ramasamy
2002-10-24 18:32         ` Antony Stone
2002-10-24 19:17         ` Cedric Blancher
2002-10-24 12:17     ` Hi , problem with quota and Time hare ram

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=200210241245.52685.roy@karlsbakk.net \
    --to=roy@karlsbakk.net \
    --cc=Antony@Soft-Solutions.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox