* [gentoo-user] iptables: --state/--syn
@ 2006-02-21 17:12 Jarry
0 siblings, 0 replies; only message in thread
From: Jarry @ 2006-02-21 17:12 UTC (permalink / raw
To: gentoo-user
Hi,
I'm trying to configure some basic iptables rules, and came across
to "state" module. Could someone please explain me, what is the main
difference between using "--state ESTABLISHED" and "!--syn" options
in iptables?
I thought I will define rules for incomming ssh-connections as:
iptables -A INPUT --sport 1024:65535 -d $MY_IP --dport 22 -p tcp -j ACCEPT
iptables -A OUTPUT -s $MY_IP --sport 22 --dport 1024:65535 -p tcp !--syn -j ACCEPT
If I substitute the second rule with:
iptables -A OUTPUT -s $MY_IP --sport 22 --dport 1024:65535 -p tcp -m state
--state ESTABLISHED -j ACCEPT
would it be the same? Or should I combine --state ESTABLISHED with !--syn ?
Jarry
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-02-21 17:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-21 17:12 [gentoo-user] iptables: --state/--syn Jarry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox