Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Preventing hotlinking of RTMP

  1. #1

    Default Preventing hotlinking of RTMP

    I have gone through the tutorial

    http://www.wowza.com/forums/content....Flash-SWF-file

    But still i can access my stream from any domain name. I have some doubts regarding the addition of the module. I have extracted and copied /lib/wms-plugin-collection.jar from the package to the Wowza /lib folder. Where the other files are to be extracted?

    In the Application.xml , Does the following line denotes the path?

    <class>com.wowza.wms.plugin.collection.module.ModuleHotlinkDenial</Class>
    Please do guide me. I am new to Wowza and started learning a week ago.

  2. #2
    Join Date
    Sep 2011
    Posts
    1,933

    Default

    Hi,
    Have you added the Module and Properties to the Application.xml file?
    After adding the files to the lib directory, Wowza will need to be restarted.

    Add this Module last in the Modules section of your Application.xml
    <Module>
    	<Name>Hotlink Denial</Name>
    	<Description>Hotlink Denial Module</Description>
    	<Class>com.wowza.wms.plugin.collection.module.ModuleHotlinkDenial</Class>
    </Module>
    Add this Property section to the Properties section below the Modules in the Application.xml
    <Property>
    	<Name>domainLock</Name>
    	<Value>localhost,mysite.com</Value>
    </Property>
    <Property>
    	<Name>AllowEncoder</Name>
    	<Value>Wirecast</Value> <!--FM, Wirecast-->
    </Property>
    After restarting Wowza are you able to play the RTMP stream from another site?

    Jason

  3. #3

    Default

    I have tried this. But Still i can play my stream from another site. I have extracted the .java files to /usr/local/WowzaMediaServer/src/com/wowza/wms/plugin/collection/module/

    Is this path correct? What is the role of Wirecast in the code?

  4. #4
    Join Date
    Sep 2011
    Posts
    1,933

    Default

    Hi,
    When you have added the Wowza Modules collection (wms-plugin-collection.jar) to the [Wowza-Install]/lib directory and added the Properties already mentioned then restarted Wowza, you will then be restricting the playback to the site configured by the domainLock Property. In the example Properties above, the website you want the stream to play from is called mysite.com and you will be allowing Wirecast encoders to publish to the application.

    The code is provided for adjusting the Module should you choose to but is not needed other than for this purpose.

    Can you post the Application.xml in the thread for me?

    Thanks
    Jason

    *Corrected typing error from [Wowza-Install]/bin to [Wowza-Install]/lib.
    Last edited by JasonH; 10-28-2013 at 08:46 AM.

  5. #5

    Default

    <Root>
    <Application>
    <!-- Uncomment to set application level timeout values
    <ApplicationTimeout>60000</ApplicationTimeout>
    <PingTimeout>12000</PingTimeout>
    <ValidationFrequency>8000</ValidationFrequency>
    <MaximumPendingWriteBytes>0</MaximumPendingWriteBytes>
    <MaximumSetBufferTime>60000</MaximumSetBufferTime>
    <MaximumStorageDirDepth>25</MaximumStorageDirDepth>
    -->
    <Connections>
    <AutoAccept>true</AutoAccept>
    <AllowDomains></AllowDomains>
    </Connections>
    <!--
    StorageDir path variables

    ${com.wowza.wms.AppHome} - Application home directory
    ${com.wowza.wms.ConfigHome} - Configuration home directory
    ${com.wowza.wms.context.VHost} - Virtual host name
    ${com.wowza.wms.context.VHostConfigHome} - Virtual host config directory
    ${com.wowza.wms.context.Application} - Application name
    ${com.wowza.wms.context.ApplicationInstance} - Application instance name

    -->
    <Streams>
    <StreamType>default</StreamType>
    <StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
    <KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
    <!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer, mpegdashstreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater, sanjosestreamingrepeater, dvrstreamingpacketizer, dvrstreamingrepeater -->
    <LiveStreamPacketizers></LiveStreamPacketizers>
    <!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
    <Properties>
    </Properties>
    </Streams>
    <Transcoder>
    <!-- To turn on transcoder set to: transcoder -->
    <LiveStreamTranscoder></LiveStreamTranscoder>
    <!-- [templatename].xml or ${SourceStreamName}.xml -->
    <Templates>${SourceStreamName}.xml,transrate.xml</Templates>
    <ProfileDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles</ProfileDir>
    <TemplateDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/templates</TemplateDir>
    <Properties>
    </Properties>
    </Transcoder>

    <DVR>
    <!-- As a single server or as an origin, use dvrstreamingpacketizer in LiveStreamPacketizers above -->
    <!-- Or, in an origin-edge configuration, edges use dvrstreamingrepeater in LiveStreamPacketizers above -->
    <!-- As an origin, also add dvrchunkstreaming to HTTPStreamers below -->

    <!-- If this is a dvrstreamingrepeater, define Application/Repeater/OriginURL to point back to the origin -->

    <!-- To turn on DVR recording set Recorders to dvrrecorder. This works with dvrstreamingpacketizer -->
    <Recorders></Recorders>

    <!-- As a single server or as an origin, set the Store to dvrfilestorage-->
    <!-- edges should have this empty -->
    <Store></Store>

    <!-- Window Duration is length of live DVR window in seconds. 0 means the window is never trimmed. -->
    <WindowDuration>0</WindowDuration>

    <!-- Storage Directory is top level location where dvr is stored. e.g. c:/temp/dvr -->
    <StorageDir>${com.wowza.wms.context.VHostConfigHome}/dvr</StorageDir>

    <!-- valid ArchiveStrategy values are append, version, delete -->
    <ArchiveStrategy>append</ArchiveStrategy>

    <!-- Properties for DVR -->
    <Properties>
    </Properties>
    </DVR>

    <TimedText>
    <!-- VOD caption providers (separate with commas): vodcaptionprovidermp4_3gpp, vodcaptionproviderttml, vodcaptionproviderwebvtt, vodcaptionprovidersrt, vodcaptionproviderscc -->
    <VODTimedTextProviders>vodcaptionprovidermp4_3gpp</VODTimedTextProviders>

    <!-- Properties for TimedText -->
    <Properties>
    </Properties>
    </TimedText>

    <!-- HTTPStreamers (separate with commas): cupertinostreaming, smoothstreaming, sanjosestreaming, mpegdashstreaming, dvrchunkstreaming -->
    <HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>
    <SharedObjects>
    <StorageDir></StorageDir>
    </SharedObjects>
    <Client>
    <IdleFrequency>-1</IdleFrequency>
    <Access>
    <StreamReadAccess>*</StreamReadAccess>
    <StreamWriteAccess>*</StreamWriteAccess>
    <StreamAudioSampleAccess></StreamAudioSampleAccess>
    <StreamVideoSampleAccess></StreamVideoSampleAccess>
    <SharedObjectReadAccess>*</SharedObjectReadAccess>
    <SharedObjectWriteAccess>*</SharedObjectWriteAccess>
    </Access>
    </Client>
    <RTP>
    <!-- RTP/Authentication/[type]Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
    <Authentication>
    <PublishMethod>digest</PublishMethod>
    <PlayMethod>none</PlayMethod>
    </Authentication>
    <!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
    <AVSyncMethod>senderreport</AVSyncMethod>
    <MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
    <IdleFrequency>75</IdleFrequency>
    <RTSPSessionTimeout>90000</RTSPSessionTimeout>
    <RTSPMaximumPendingWriteBytes>0</RTSPMaximumPendingWriteBytes>
    <RTSPBindIpAddress></RTSPBindIpAddress>
    <RTSPConnectionIpAddress>0.0.0.0</RTSPConnectionIpAddress>
    <RTSPOriginIpAddress>127.0.0.1</RTSPOriginIpAddress>
    <IncomingDatagramPortRanges>*</IncomingDatagramPortRanges>
    <!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->
    <Properties>
    </Properties>
    </RTP>
    <MediaCaster>
    <RTP>
    <RTSP>
    <!-- udp, interleave -->
    <RTPTransportMode>interleave</RTPTransportMode>
    </RTSP>
    </RTP>
    <!-- Properties defined here will override any properties defined in conf/MediaCasters.xml for any MediaCasters loaded by this applications -->
    <Properties>
    </Properties>
    </MediaCaster>
    <MediaReader>
    <!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->
    <Properties>
    </Properties>
    </MediaReader>
    <MediaWriter>
    <!-- Properties defined here will override any properties defined in conf/MediaWriter.xml for any MediaWriter loaded by this applications -->
    <Properties>
    </Properties>
    </MediaWriter>
    <LiveStreamPacketizer>
    <!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->
    <Properties>
    </Properties>
    </LiveStreamPacketizer>
    <HTTPStreamer>
    <!-- Properties defined here will override any properties defined in conf/HTTPStreamers.xml for any HTTPStreamer loaded by this applications -->
    <Properties>
    </Properties>
    </HTTPStreamer>
    <Repeater>
    <OriginURL></OriginURL>
    <QueryString><![CDATA[]]></QueryString>
    </Repeater>
    <Modules>

    <Module>
    <Name>Hotlink Denial</Name>
    <Description>Hotlink Denial Module</Description>
    <Class>com.wowza.wms.plugin.collection.module.ModuleHotlinkDenial</Class>
    </Module>
    <Module>
    <Name>base</Name>
    <Description>Base</Description>
    <Class>com.wowza.wms.module.ModuleCore</Class>
    </Module>
    <Module>
    <Name>logging</Name>
    <Description>Client Logging</Description>
    <Class>com.wowza.wms.module.ModuleClientLogging</Class>
    </Module>
    <Module>
    <Name>flvplayback</Name>
    <Description>FLVPlayback</Description>
    <Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
    </Module>
    </Modules>
    <!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
    <Properties>
    <Property>
    <Name>domainLock</Name>
    <Value>localhost,stream4life.com</Value>
    </Property>
    <Property>
    <Name>AllowEncoder</Name>
    <Value>Wirecast</Value> <!--FM, Wirecast-->
    </Property>
    </Properties>
    </Application>
    </Root>

  6. #6

    Default

    In the Tutorial, it is instructed to copy /lib/wms-plugin-collection.jar from the package to the Wowza /lib folder. But you said to copy it to [Wowza-Install]/bin directory . Anyways i tried both and nothing worked . Can i check the currently loaded modules of Wowza using some command?
    Last edited by stream4life; 10-28-2013 at 05:33 AM.

  7. #7
    Join Date
    May 2013
    Posts
    680

    Default

    Try placing the Hotlink denial module last in the modules list. Also, to clarify, you'll want to put the jar file in the [install-dir]/lib folder. If you have further issues run it in DEBUG mode and you should see each module load for the given application.

  8. #8

    Default

    Not working

  9. #9
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    still i can access my stream from any domain name.
    What do you mean exactly? The hotlinkdenial helps prevent others from hotlinking your player's swf file. It does not prevent anyone from using your RTMP url in their player.

    Take a look at Security Overview guide. You probably want to use SecureToken.

    Richard

  10. #10

    Default

    Quote Originally Posted by rrlanham View Post
    What do you mean exactly? The hotlinkdenial helps prevent others from hotlinking your player's swf file. It does not prevent anyone from using your RTMP url in their player.

    Take a look at Security Overview guide. You probably want to use SecureToken.

    Richard

    I tried the default wowza player in another browser and played the rtmp stream. Is nt it called as hotlink?

Page 1 of 2 12 LastLast

Similar Threads

  1. Prevent hotlinking to rtmp stream?
    By BrianPss in forum General Forum
    Replies: 3
    Last Post: 03-05-2014, 05:23 PM
  2. Wowza DVR: preventing corruption and overwriting
    By Scorce in forum AddOn: Wowza nDVR
    Replies: 19
    Last Post: 05-14-2012, 08:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •