public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] {OT} TCP or UDP?
@ 2009-02-24 16:39 Grant
  2009-02-24 16:55 ` [gentoo-user] " Nikos Chantziaras
  0 siblings, 1 reply; 6+ messages in thread
From: Grant @ 2009-02-24 16:39 UTC (permalink / raw
  To: Gentoo mailing list

How can I find out whether I should be specifying TCP, UDP, or both
for iptables (shorewall) config?

- Grant



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gentoo-user]  Re: {OT} TCP or UDP?
  2009-02-24 16:39 [gentoo-user] {OT} TCP or UDP? Grant
@ 2009-02-24 16:55 ` Nikos Chantziaras
  2009-02-24 17:21   ` Florian Philipp
  0 siblings, 1 reply; 6+ messages in thread
From: Nikos Chantziaras @ 2009-02-24 16:55 UTC (permalink / raw
  To: gentoo-user

Grant wrote:
> How can I find out whether I should be specifying TCP, UDP, or both
> for iptables (shorewall) config?

By knowing the application's protocol for which you write the rules for :P

For example, if I write some rule that applies to traffic generated by a 
web server and web browsers, that's TCP.  If I write rules that apply to 
an online game's matchmaking and game discovery browser, that's UDP (but 
depends on the game).  So you have to research a bit to see if the 
application uses TCP or UDP.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user]  Re: {OT} TCP or UDP?
  2009-02-24 16:55 ` [gentoo-user] " Nikos Chantziaras
@ 2009-02-24 17:21   ` Florian Philipp
  2009-02-24 17:51     ` Etaoin Shrdlu
  0 siblings, 1 reply; 6+ messages in thread
From: Florian Philipp @ 2009-02-24 17:21 UTC (permalink / raw
  To: gentoo-user

Nikos Chantziaras schrieb:
> Grant wrote:
>> How can I find out whether I should be specifying TCP, UDP, or both
>> for iptables (shorewall) config?
> 
> By knowing the application's protocol for which you write the rules for :P
> [...]   So you have to research a bit to see if the
> application uses TCP or UDP.
> 
> 

  You can also have a look at /etc/services which lists the more common 
protocols and their ports.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user]  Re: {OT} TCP or UDP?
  2009-02-24 17:21   ` Florian Philipp
@ 2009-02-24 17:51     ` Etaoin Shrdlu
  2009-02-24 19:15       ` kashani
  0 siblings, 1 reply; 6+ messages in thread
From: Etaoin Shrdlu @ 2009-02-24 17:51 UTC (permalink / raw
  To: gentoo-user

On Tuesday 24 February 2009, 18:21, Florian Philipp wrote:
> Nikos Chantziaras schrieb:
> > Grant wrote:
> >> How can I find out whether I should be specifying TCP, UDP, or both
> >> for iptables (shorewall) config?
> >
> > By knowing the application's protocol for which you write the rules
> > for :P [...]   So you have to research a bit to see if the
> > application uses TCP or UDP.
>
>   You can also have a look at /etc/services which lists the more
> common protocols and their ports.

Or even sniff the traffic and see which protocols are used.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user]  Re: {OT} TCP or UDP?
  2009-02-24 17:51     ` Etaoin Shrdlu
@ 2009-02-24 19:15       ` kashani
  2009-02-25 15:30         ` Grant
  0 siblings, 1 reply; 6+ messages in thread
From: kashani @ 2009-02-24 19:15 UTC (permalink / raw
  To: gentoo-user

Etaoin Shrdlu wrote:
> On Tuesday 24 February 2009, 18:21, Florian Philipp wrote:
>> Nikos Chantziaras schrieb:
>>> Grant wrote:
>>>> How can I find out whether I should be specifying TCP, UDP, or both
>>>> for iptables (shorewall) config?
>>> By knowing the application's protocol for which you write the rules
>>> for :P [...]   So you have to research a bit to see if the
>>> application uses TCP or UDP.
>>   You can also have a look at /etc/services which lists the more
>> common protocols and their ports.
> 
> Or even sniff the traffic and see which protocols are used.
> 

	You're going to miss stuff that way. Take for example a DNS server. 
Normally requests are UDP over port 53. However once your request 
exceeds 512 bytes TCP is used on port 53. That rarely happens and in 
fact many ISPs don't seem to be aware that this can happen.
	Chances are you're going to find almost everything you need at 
http://www.shorewall.net/Documentation_Index.html which is going to far 
better than trying to cobble everything together yourself.

kashani




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Re: {OT} TCP or UDP?
  2009-02-24 19:15       ` kashani
@ 2009-02-25 15:30         ` Grant
  0 siblings, 0 replies; 6+ messages in thread
From: Grant @ 2009-02-25 15:30 UTC (permalink / raw
  To: gentoo-user

>>>>> How can I find out whether I should be specifying TCP, UDP, or both
>>>>> for iptables (shorewall) config?
>>>>
>>>> By knowing the application's protocol for which you write the rules
>>>> for :P [...]   So you have to research a bit to see if the
>>>> application uses TCP or UDP.
>>>
>>>  You can also have a look at /etc/services which lists the more
>>> common protocols and their ports.
>>
>> Or even sniff the traffic and see which protocols are used.
>>
>
>        You're going to miss stuff that way. Take for example a DNS server.
> Normally requests are UDP over port 53. However once your request exceeds
> 512 bytes TCP is used on port 53. That rarely happens and in fact many ISPs
> don't seem to be aware that this can happen.
>        Chances are you're going to find almost everything you need at
> http://www.shorewall.net/Documentation_Index.html which is going to far
> better than trying to cobble everything together yourself.
>
> kashani

Thanks, I'll take a look through there.

- Grant



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-02-25 15:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-24 16:39 [gentoo-user] {OT} TCP or UDP? Grant
2009-02-24 16:55 ` [gentoo-user] " Nikos Chantziaras
2009-02-24 17:21   ` Florian Philipp
2009-02-24 17:51     ` Etaoin Shrdlu
2009-02-24 19:15       ` kashani
2009-02-25 15:30         ` Grant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox