1 |
Hi, |
2 |
|
3 |
I'm trying to configure some basic iptables rules, and came across |
4 |
to "state" module. Could someone please explain me, what is the main |
5 |
difference between using "--state ESTABLISHED" and "!--syn" options |
6 |
in iptables? |
7 |
|
8 |
|
9 |
I thought I will define rules for incomming ssh-connections as: |
10 |
|
11 |
iptables -A INPUT --sport 1024:65535 -d $MY_IP --dport 22 -p tcp -j ACCEPT |
12 |
iptables -A OUTPUT -s $MY_IP --sport 22 --dport 1024:65535 -p tcp !--syn -j ACCEPT |
13 |
|
14 |
If I substitute the second rule with: |
15 |
|
16 |
iptables -A OUTPUT -s $MY_IP --sport 22 --dport 1024:65535 -p tcp -m state |
17 |
--state ESTABLISHED -j ACCEPT |
18 |
|
19 |
would it be the same? Or should I combine --state ESTABLISHED with !--syn ? |
20 |
|
21 |
Jarry |
22 |
-- |
23 |
gentoo-user@g.o mailing list |