--state NEW for UDP?

This is a discussion on --state NEW for UDP? within the Linux Security forums, part of the System Security and Security Related category; AZ Nomad a écrit : > > NAT boxes using UDP broadcast their UDP packets to > everybody on the physical ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 1 Week Ago
Pascal Hambourg
 
Posts: n/a
Default Re: --state NEW for UDP?

AZ Nomad a écrit :
>
> NAT boxes using UDP broadcast their UDP packets to
> everybody on the physical network.


Nonsense. UDP NAT does not work this way, it just cannot work this way.
UDP NAT is stateful.
Reply With Quote
  #12 (permalink)  
Old 1 Week Ago
AZ Nomad
 
Posts: n/a
Default Re: --state NEW for UDP?

On Fri, 02 May 2008 16:03:01 +0200, Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> wrote:
>AZ Nomad a écrit :
>>
>> NAT boxes using UDP broadcast their UDP packets to
>> everybody on the physical network.


>Nonsense. UDP NAT does not work this way, it just cannot work this way.
>UDP NAT is stateful.


It does and it has to. UDP packets are not point to point. They
are broadcast.

Perhaps you are confusing the NFS layer atop UDP with UDP itself?
Reply With Quote
  #13 (permalink)  
Old 1 Week Ago
Burkhard Ott
 
Posts: n/a
Default Re: --state NEW for UDP?

Am Fri, 02 May 2008 11:09:10 -0500 schrieb AZ Nomad:

> Perhaps you are confusing the NFS layer atop UDP with UDP itself?


Nope, a DNS query is defently unicast.
Reply With Quote
  #14 (permalink)  
Old 1 Week Ago
Hal Murray
 
Posts: n/a
Default Re: --state NEW for UDP?


>UDP is stateless. NAT boxes using UDP broadcast their UDP packets to
>everybody on the physical network.


Not mine. If an incoming UDP packet doesn't match a connection
or an entry in the "server" table that tells it the IP Address
to send it to, the packet gets dropped.

Maybe an ICMP error is sent back.

--
These are my opinions, not necessarily my employer's. I hate spam.

Reply With Quote
  #15 (permalink)  
Old 1 Week Ago
Pascal Hambourg
 
Posts: n/a
Default Re: --state NEW for UDP?

AZ Nomad a écrit :
>
> UDP packets are not point to point. They are broadcast.


Unicast UDP packets are point to point. DNS queries and replies over UDP
are unicast.

> Perhaps you are confusing the NFS layer atop UDP with UDP itself?


No. What does NFS have to do with this ?
Reply With Quote
  #16 (permalink)  
Old 1 Week Ago
Greg Russell
 
Posts: n/a
Default Re: --state NEW for UDP?

On Fri, 02 May 2008 12:37:18 +0000, Andrew Gideon wrote:

> Perhaps the issue is that responses are coming from different IPs than
> that to which the requests are sent?


Thank you, I think that is the most likely scenario, as /etc/resolv.conf
on all NAT'd machines lists 148.78.249.20[01] and the occasional
"unsolicited" UDP packets emanate from SPT=53 on 148.78.249.20[0-3].

I'll use wireshark to examine the traffic and verify that hypothesis if
possible.
Reply With Quote
  #17 (permalink)  
Old 1 Week Ago
Andrew Gideon
 
Posts: n/a
Default Re: --state NEW for UDP?


>> This doesn't mean that a stateful protocol cannot be built over UDP.
>> DNS has "responses". Therefore, it has state.

>
> No, it doesn't you surely mean a session in the firewall/filter. You
> can't mix a stateless protocoll with a stateful. (but you could
> encapsulate it)


I wrote what I meant (or at least that part of it {8^), and I stand by it
(though in fact we're also speaking of firewall session states in this
conversation). An arbitrary protocol could be built over UDP which
provided it's own three-way handshake for session initiation, packet
sequence numbers, etc. These wouldn't be a part of UDP, of course, but
would be a part of the arbitrary protocol that we'd built that happens to
use UDP as the underlying transport.

So a stateful protocol can be built on top of a stateless protocol.

[But perhaps this is what you mean by "encapsulate"?]

In fact, if memory serves Ethernet is stateless. TCP packets are
transported over Ethernet.

Though, in fact, there is something I wrote incorrectly in my previous
note. DNS isn't stateful because it has requests and responses. That's
not how the term is used.

> Many stateful firewalls are able to track the state of flows in
> connectionless protocols, like UDP.


That is also true. These can also track "related" flows, like the DATA
circuit used by FTP.

[...]
> Sessions in connectionless protocols
> can only end by time-out, because there is no flag where you could
> see that ist the last packet.


This isn't necessarily true. For example, a firewall could choose to
take down the "session" for a DNS request when the response was seen.
But this is protocol specific and requires an inspecting firewall.

[...]

>
> By keeping track of the connection state, stateful firewalls provide
> added efficiency in terms of packet inspection. This is because for
> existing connections the firewall need only check the state table,
> instead of checking the packet against the firewall's rule set, which
> can be extensive.


So can the state table be extensive. From what I've read, stateless
tends to win in efficiency for this reason (though there's the added
complexity that a stateless firewall is likely to have a larger rule set).

- Andrew
Reply With Quote
  #18 (permalink)  
Old 1 Week Ago
Andrew Gideon
 
Posts: n/a
Default Re: --state NEW for UDP?

On Fri, 02 May 2008 11:09:10 -0500, AZ Nomad wrote:

> It does and it has to. UDP packets are not point to point. They are
> broadcast.


I'm afraid not (though they *can* be broadcast; they don't have to be).
Do you imagine that any/every DNS request is broadcast? Or that NFS
packets are sent to every machine on a network? What happens when NFS
packets are routed?

A UDP packet has an IP address destination (though this could be a
broadcast address for a given network).

- Andrew
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

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



All times are GMT +1. The time now is 11:45 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0