Networking Forums

Networking Forums > Computer Networking > Linux Networking > Problem with iptables tcp-flags

Reply
Thread Tools Display Modes

Problem with iptables tcp-flags

 
 
Martin Schneider
Guest
Posts: n/a

 
      04-29-2005, 10:07 AM
I want a iptables rule to match if for example URG or/and PSH or/and
ACK controlflag are set and dont care if FIN, SYN,.. flags are set or
not.

How do you do that with
--tcp-flags [!] mask comp

It should go easier than this:
--tcp-flags URG,PSH,ACK URG or --tcp-flags URG,PSH,ACK PSH or
--tcp-flags URG,PSH,ACK ACK or --tcp-flags URG,PSH,ACK URG,PSH ... and
so on ???
 
Reply With Quote
 
 
 
 
Vincent Jaussaud
Guest
Posts: n/a

 
      04-29-2005, 10:42 AM
Martin Schneider wrote:

> I want a iptables rule to match if for example URG or/and PSH or/and
> ACK controlflag are set and dont care if FIN, SYN,.. flags are set or
> not.
>
> How do you do that with
> --tcp-flags [!] mask comp
>
> It should go easier than this:
> --tcp-flags URG,PSH,ACK URG or --tcp-flags URG,PSH,ACK PSH or
> --tcp-flags URG,PSH,ACK ACK or --tcp-flags URG,PSH,ACK URG,PSH ... and
> so on ???


man iptables:

"...Flags are: SYN ACK FIN RST URG PSH ALL
NONE..."

So: --tcp-flags ALL PSH will do what you want.

And again, being polite on newsgroups usually help to have answers !

--
Vincent Jaussaud, Kelkoo.com IT Architect
---
When I say the magic word to all these people, they will vanish forever.
I will then say the magic words to you, and you, too, will vanish -- never
to be seen again.
-- Kurt Vonnegut Jr., "Between Time and Timbuktu"

 
Reply With Quote
 
Horst Knobloch
Guest
Posts: n/a

 
      04-29-2005, 06:04 PM
Martin Schneider <(E-Mail Removed)> wrote:

> I want a iptables rule to match if for example URG or/and PSH or/and
> ACK controlflag are set and dont care if FIN, SYN,.. flags are set or
> not.


--tcp-flags ! URG,PSH,ACK NONE

--
»When pings go wrong (It hurts me too)« E.Clapton/E.James/P.Tscharn
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP] flags [DF] always set lollolo Linux Networking 2 11-25-2011 02:55 PM
What do TCP Flags mean Rich Windows Networking 2 03-10-2009 06:45 PM
Firewall Flags MikeV06 Windows Networking 0 01-04-2006 02:18 PM
Re : Problem with iptables tcp-flags Martin Schneider Linux Networking 0 04-29-2005 02:59 PM
about arp Flags message ... ÃÖ±Ô¶ô Linux Networking 1 05-11-2004 01:22 PM



1 2 3 4 5 6 7 8 9 10 11