Wowza Community

GeoIP Locking Module

I used your module as a base and wrote my own, which allows to limit content based on multiple country codes via “allow from all, deny from xxx” or vice versa “deny from all, allow from xxx” style rules.

Config file with the country code limitations can be reloaded on the fly (does not require restart of wowza server).

There’s now also a commercial version available: It’s compatible with the latest Wowza versions (4.5.0+ at time of writing).

Best regards,

Tit Petric

I see a XML typo in locationinfo.xml. Double “>>” in Value tag

Change this


To This:



I don’t know much about this 3rd party addon, but from what you report it is installed and working. I’m not sure what you want it to do and if it is working as you expect, but it is doing something.


You are trying to fallback to a file in a live application, which won’t work. The GeolocationPlaybackFile should be a live stream.

You could play labaca.flv as a live stream in a loop using the Stream class. Take a look at these examples:


Cool, thanks for the update.


No, it’s much too soon. The soonest you can get stream name server-side is by overriding play

Or in IMediaStreamActionNotify3 onPlay


@Tit Petric

You have a small typo in the Application.xml snippets section of your git repo.

<!-- GeoIPDatabase: default location: /usr/share/GeoIP/GeoIP.dat

The comment is not closed - obviously easy to spot - might want to close that :smiley:

You need to look at adding the function

public void onHTTPCupertinoStreamingSessionCreate(HTTPStreamerSessionCupertino httpCupertinoStreamingSession)
	//boolean isGood = true;
	//String ipAddress = httpCupertinoStreamingSession.getIpAddress();
	//String queryStr = httpCupertinoStreamingSession.getQueryStr();
	//String referrer = httpCupertinoStreamingSession.getReferrer();
	//String cookieStr = httpCupertinoStreamingSession.getCookieStr();
	//String userAgent = httpCupertinoStreamingSession.getUserAgent();

into the code.



works great for flash. Can someone provide an update so it would work with smooth streaming also? Thanks.

where is the jar files? We do not see on github.

Compatible with wowza 2.2.3 ?

Do you have files ready for use? … as “Example” in wowzamedia

I ask to send on my e-mail

Best Regards, Wowzek:(

Just a bit of news:

I added IP and Netmask support into the GeoIP module on github.


That’s not a typo, it’s valid xml. I commented out an optional part of the config - the optional location to the GeoIP database, if you have it in another location.


I will make the jar file available on github shortly. You can download it from there and set it up manually. If you use a Wowza Media Server version different than 2.1.0, your mileage may vary, and should try to build the module yourself.

Best Regards,

Tit Petric

And some more news:

  • Updated to WowzaMediaServer 2.1.2 (module available for download on github)

  • Added functionality to remap geo-blocked streams to a default file stream (config based). This way you can play an informative clip to the user, explaining why he cannot access geo blocked content.

As far as internals go, I now override the play() method, instead of using stream listeners. Comments and suggestions are appreciated.

Wowza-Geoip module (github)

Contact me at if you have any feature requests (like smooth streaming here :)). Cuppertino streams are supported in a branch on github (not merged into master yet), but smoothsteaming check is not yet implemented. I’ll try to look at it during the next few weeks!

I’m glad people use the module without major problems (mostly configuration issues ;)). Thanks for your support.

New version is released, 1.0.2, also available as a precompiled .jar file for WMS 2.2.4

Get it at

Added features:

  • Smoothstreaming support

  • San Jose HTTP streaming support

  • RTSP support (UNTESTED!)

  • CupertinoStreaming support (previously available only in hampei’s branch, thanks to marzipi above for the patch).

Let me know how it works for you, and If there are any problems. Any log4j/debug logs containing “geoip.rtp” are appreciated, to debug it in case of problems.

Note: The redirect feature only works on normal RTMP streams for now, I will be looking into supporting it for other streaming types in the future.

Best regards,

Tit Petric


since i have a large number of files that i have to block and i don’t want wowza to parse a large xml, i was wondering is there an option to have a single xml file for each video located in same dir as video?

Thank you in advance for your help.


The geoip xml file only gets parsed once or on every modification. There really is no reason to worry about this, unless you modify this file often. It is cached when it’s loaded. How big is the file? I wouldn’t worry for anything below 1 megabyte anyway.

Edit: There’s not a commercial GeoIP plugin available.

You can review the documentation here:

The plugin is available for purchase here:




I think it must be easy but I am confused. Maybe its because my English skills are not the best.

Okay, my setup should “allow all countries” and “deny DE” for example for a vod application:



my locationinfo.xml:

<?xml version="1.0" encoding="utf-8"?>
	<Locatfion path="vod/" restrict="none">
		<Except type="country">DE</Except>

But this setup will play my file.

I am running WOWZA on a Win2008 by the way… Are the paths correct?




after Tit helps me to unknot my brain I must say, I mistake accept with except and that was my problem.

Here the solution if someone had the same:

Just use



[/HTML] if you want to restrict playback in only one country (in this case, every country except US will play your stream).

If you want to limit it to just US (and no other country will play your stream), change the restrict="" argument in to “all”.

And thats all…


goto and klick on the download button :wink:

It is compatible with with 2.2.3 - I use it and it works perfekt!