Skip to content

Stream publishing and playback restriction by name

Overview

Sometimes a stream publishing and playback should be restricted by the stream name. For example, a DDoS attack to the server by publishing an RTMP stream from a random addresses pool to a standard RTMP port may be prevented by stream name (or names) restriction. To do this, since build 5.2.1739 stream publishing and playback may be restricted by a certain name or a name mask.

Configuration

By default, a stream with any name may be published or played. A restrictions may be applied by the following parameter

allow_stream_names=!bad_stream,*

Or a certain stream name may be allowed but all the other stream names forbidden

allow_stream_names=good_stream,!*

The asterisk mask defining all the streams names must be the last in the list.

The parameter may be applied without WCS restart. If a stream with a forbidden name is already publishing and playing, it will not be stopped, but a new subscribers cannot play it, a new publication also cannot be started.