On Wednesday 15 September 2004 14:40, Ian Shaw wrote:
> You can block them via referrer, I can't remember what the cvar is
> but there was something you can use to set what the referrer is
> (which was then hidden) and then setup your web server to only allow
> access if the referrer is correct.
>
> I might have just imagined the above, or it may well have been that
> the http referrer was automatically set to the servers IP/PORT.

You don't need to set anything to specify the referer, IIRC it appears
as:

hl1://refering.server.ip.address:port

(Presumably SRCDS referals will be hl2:// etc.)

you can restrict the downloads pretty easily if you're using apache, you
just need mod_rewrite and a configuration rule like this:

<Directory "/path/to/download/directory">
        RewriteEngine On
        RewriteCond %{HTTP_REFERER} !YOUR\.GAMESERVER\.IP\.ADDRESS
        RewriteRule ^/.* - [F]
</Directory>

This rewrites any request where the referer dosn't match the appropriate
IP to HTTP 403 (Forbidden).

Nick.

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to