From: Tom Marshall <tommy@home.tig-grr.com>
To: Brad Morgan <B-Morgan@concentric.net>
Cc: "'Netfilter (E-mail)'" <netfilter@lists.netfilter.org>
Subject: Re: How to allow Real Player
Date: Wed, 13 Aug 2003 13:24:02 -0700 [thread overview]
Message-ID: <20030813202402.GA11672@home.tig-grr.com> (raw)
In-Reply-To: <000001c3614e$e5eeed50$0400a8c0@bradmorgan>
[-- Attachment #1: Type: text/plain, Size: 3517 bytes --]
Please note most of the following discussion applies to RTSP in general, not
just RealPlayer.
On Tue, Aug 12, 2003 at 09:56:31PM -0600, Brad Morgan wrote:
> I'm trying to understand how to setup my firewall to allow Real Player.
> Based on the text below, I've written the following rules:
>
> ## Allow Real Player
> for i in $LANIPS; do
> iptables -A FORWARD -p tcp -s $i --dport 554 -j ACCEPT
> iptables -A FORWARD -p tcp -s $i --dport 7070 -j ACCEPT
> done
> iptables -A FORWARD -p udp --dport 6970:6979 -j ACCEPT
>
> I limited the number of UDP ports to a much smaller range than they suggest.
The RTSP protocol normally uses TCP port 554. Port 7070 is for an old
proprietary protocol called PNA that has been deprecated for over 5 years.
You may still run into it occasionally, but hopefully that is rare.
RTSP is a control protocol. It does the equivalent of the play/pause/stop
buttons. The actual data can flow either in separate UDP packets (this is
preferred), or interleaved within the same TCP connection as RTSP.
> What I don't understand is the statement "The range of UDP ports, on the
> other hand, carries the incoming stream. These ports begin to carry traffic
> only after RealPlayer and RealServer have performed the authentication
> routine, and should be enabled only for incoming traffic."
>
> Is the firewall going to know what to do with an incoming packet to one of
> these UDP ports? If the internal machine initiated the conversation, then
> ESTABLISHED would know what to do, but that would be outgoing traffic which
> the documentation says won't happen.
When using UDP, the server usually starts sending packets to the client
first. This means that the NAT does not have a chance to create a mapping
between client and server, so it doesn't know where to send the UDP packets.
Newer clients are getting around this problem with techniques such as STUN
and Symmetric RTP, but most clients don't have this ability.
> Is this another one of those applications that needs a "helper"? Does one
> exist? I looked but couldn't find it.
Bingo! :-)
In order to solve this problem, you need to use an RTSP ALG (helper module).
I wrote one for the 2.4.21-preX kernels some months ago. It's not been
updated in some time due to lack of response. The changes to get the patch
running on the released 2.4.21 kernel are fairly trivial. You can download
it here:
http://home.tig-grr.com/rtsp/index.html
Only 2.4.21-preX is listed at the moment. I plan to update the module at
some point in the near future and support various kernel versions.
Eventually it would be nice to get the module into the Linux kernel.
> Strange thing is, the user's web cast worked after adding the above rules,
> but capturing the traffic using Ethereal didn't show any UDP traffic at all,
> only TCP and RSTP on 554. I did however, see realplayer.exe listening on
> UDP port 6970.
Typically, the client will realize after a few seconds that it's not getting
any packets and switch over to TCP mode. Some of the more intelligent
clients (such as RealONE players) will remember which servers are not
accessible via UDP and they won't attempt UDP from that server again for
some time. This is may be why you aren't seeing any UDP packets from the
server on any arbitrary request.
--
I've finally learned what "upward compatible" means. It means we get to
keep all our old mistakes.
-- Dennie van Tassel
[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]
next prev parent reply other threads:[~2003-08-13 20:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-05 8:22 Firewall software Lawrence - D
2003-08-05 8:47 ` Tom Van Overbeke
2003-08-13 3:56 ` How to allow Real Player Brad Morgan
2003-08-13 20:24 ` Tom Marshall [this message]
2003-08-05 11:46 ` Firewall software Paul Ammann
2003-08-05 9:02 ` Lawrence - D
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030813202402.GA11672@home.tig-grr.com \
--to=tommy@home.tig-grr.com \
--cc=B-Morgan@concentric.net \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).