PDA

View Full Version : rtmpdump package on OpenSuse


mzcl-mn
08-10-2013, 11:09 AM
Hi.

I am not quite sure if this has been mentioned in other threads/forums but since I could not find any info about this I would like to share my experience on how to make rtmpdump package work on linux OpenSuSe 12.3 edition.

It took me for about two weeks to pinpoint what was wrong with the default settings on SuSeFirewall2 that were preventing me from using it at the same time as rtmpsrv/rtmpsuck. The problem was that, if I had the firewall on, even if I had set up port redirection (with the "iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner root -j REDIRECT" rule), still I would not be able to catch any stream parameters.

So I took some stubbornness of mine and "invested" in this pursuit.

Today, reading the /etc/sysconfig/SuSefirewall2 file more thoroughly, I managed to find the answer to this "disturbing" issue:


by the end of the config file /etc/sysconfig/SuSefirewall2 there's one "variable" that is not set by default (and so defaults to "yes" which is the opposite of what it should be for this particular matter);

that variable's name is FW_LO_NOTRACK, and for redirecting 1935 port, one should set it like so: FW_LO_NOTRACK="no". This means that the firewall setting will then allow "tracking" the loopback device, where rtmpsuck and rtmpsrv will be listening afterwards (after setting this variable, restarting SuSefirewall2 at root's prompt and finally issuing the redirection command given above.

So wrapping-up we've got:


edit /etc/sysconfig/SuSefirewall2 and set FW_LO_NOTRACK="no" at its end;
firing/restarting SuSefirewall2 by issuing SuSefirewall2 on a # (root) prompt
adding/appending the redirection rule (also on the # prompt like this: iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner root -j REDIRECT


Then, you can go on another terminal with the normal privileges and fire up rtmpsrv or rtmpsuck followed by your browser to get the stream parameters.

When you get those you can either just undo (Delete) the above 3rd step, or restart SuSefirewall2 that it will simply overwrite the redirection command.

Cheers!

jojesh
08-11-2013, 10:32 PM
I had faced this problem before. It is mentioned here

http://stream-recorder.com/forum/rtmpsrv-no-output-t16539.html

what i used to do is, just stop the firewall for a while and run those iptable commands and rtmpsrv then start the firewall using yast.

The steps..

Yast->Firewall->stop firewall
#> sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT
#> rtmpsrv
.....................
......................
ctrl+c
#> sudo iptables -t nat -D OUTPUT -p tcp --dport 1935 -j REDIRECT

Yast->Firewall->start firewall

You can skip the second last step because in the last step you are starting the firewall. It will overwrite the rules

But i hope if we made the changes to the configuration file there is no need to stop the firewall each time..anyway thanks for the information

I am not an expert to dig..:) but i love using opensuse

mzcl-mn
08-24-2013, 12:18 AM
Hello jojesh!

I am glad that the post I made was helpful! And I too, enjoy openSuse Very much! Actually I came from Ubuntu, and still like that distro very much. But after having tried out openSuse for like two months now I feel like it is a very good distro too. And I am (as I said before) enjoying it very much. It is like something that is a bit different from Ubuntu but this has two consequences that are pretty much tied up to each-other:
First--it kind of makes me struggle a bit to get things done the way I want;
Second--makes me learn much more about linux architecture. :)

Thank you for your feedback!

Cheers!