SRCDS Steam group


hide sv_downloadurl
#1
Is there anyway to hide the sv_downloadurl variable? Some jerk out there is using it for his server, and is stealing my bandwidth. I have a list of all the IPs that used it. But, they are all his clients. Is there anyway to trace back the server that has my URL set on it? I changed the alias on the URL to a new one. But the bastard apparently got it in a day. So far I resorted to blocking his clients ip addresses which helped a little. I would like to keep the fast download as I have a ton of custom maps; but this is insane.

Thanks
Reply
#2
Create a .htaccess file with the following as an example:

Code:
SetEnvIfNoCase Referer hl2://xx\.xx\.xx\.xx allow_download
    Order Deny,Allow
    Allow from env=allow_download
    Deny from all

Replace xx.xx.xx.xx with your server IP and place the .htaccess in your base sv_downloadurl folder.
Reply
#3
Muppet Wrote:Create a .htaccess file with the following as an example:

Code:
SetEnvIfNoCase Referer hl2://xx\.xx\.xx\.xx allow_download
    Order Deny,Allow
    Allow from env=allow_download
    Deny from all

Replace xx.xx.xx.xx with your server IP and place the .htaccess in your base sv_downloadurl folder.
I will give it a try.

Thanks
Reply
#4
I did that on mine and it works well.
Reply
#5
I used to use it until two regulars on my server could never download custom maps. When I removed the htaccess file they could download them fine :/

No idea why it only affected two people.
Reply
#6
because they were hackers!
lol joking
Reply
#7
An htaccess file that stops hackers from connecting would come in mighty handy. ^^
Reply
#8
Pazuzu Wrote:An htaccess file that stops hackers from connecting would come in mighty handy. ^^

Only thing it could really do is stop certain IPs - doubt it would be able to distinguish connecting player SteamIDs (as that would be the preferred method to stop known connected hackers).
Reply
#9
Quote:I used to use it until two regulars on my server could never download custom maps.
Some ppl have firewalls or proxys which suppress their referer link - making it impossible for people to download.

A good walkaround for this is, to allow empty referers too (this will allow people to directly download from your website, but not with other referers).

Quote:Only thing it could really do is stop certain IPs - doubt it would be able to distinguish connecting player SteamIDs (as that would be the preferred method to stop known connected hackers).
Provide me with a database of hackers, and I'll make you a script for your webspace which verifys if the Steam-Id is marked as being a hacker Smile
Q: What would an omnipotent computer to?
A: Get rid of humanity!
Reply
#10
Now that I think about it. When someone connects to the server, their IP address is displayed on the console. Is there anyway to write a script that reads the IP address from incoming players, and grants that IP address temporary access to the http server? That would probably solve everything.

My http server runs on a Linux server. I am pretty sure a script could interface with iptables without too much trouble. I just can't figure a way to have it read the IP addresses from the console.

Here is an idea that just came accross my head. I am not a programmer, which sucks, so I can’t implement this. But someone who is, could write a plug-in for srcds to store all incoming players on a small SQL database. A script on the Linux server would check the database once every second or so and add the IP addresses to iptables. When the player leaves or times out the IP address gets removed from the database, and the script removes it from iptables. This way in order to even get the maps off the server you would have to actually join it. Sounds good?
Reply
#11
It's possible to write a plugin to get the players IP address, however I've never managed to get it when they actually connected, only at the moment they join the server (where they get to see the MOTD) so that's too late.
Also if you could get the IPaddress on connect it still wouldn't be fast enough since the custom files have to be available instantly, if it has to be written in iptables etc the client would simply get a missing file error due to not having access to the downloads
Join the Source Dedicated Server Support Group on Steam Community!
Source Dedicated Server (SRCDS)
Free to join, Live support! (When available)

http://forums.srcds.com/viewtopic/5114
Reply
#12
MarleyX Wrote:Now that I think about it. When someone connects to the server, their IP address is displayed on the console. Is there anyway to write a script that reads the IP address from incoming players, and grants that IP address temporary access to the http server? That would probably solve everything.

My http server runs on a Linux server. I am pretty sure a script could interface with iptables without too much trouble. I just can't figure a way to have it read the IP addresses from the console.

Here is an idea that just came accross my head. I am not a programmer, which sucks, so I can’t implement this. But someone who is, could write a plug-in for srcds to store all incoming players on a small SQL database. A script on the Linux server would check the database once every second or so and add the IP addresses to iptables. When the player leaves or times out the IP address gets removed from the database, and the script removes it from iptables. This way in order to even get the maps off the server you would have to actually join it. Sounds good?

Thats practically what the .htaccess file does without all the SQL/plugin hassle. It only allows people who are referred to your sv_downloadurl via an HL2 game and your exact server IP (hl2:// + server IP). So, they would have to join your server to make use of your sv_downloadurl.
Reply
#13
Exactly.

And if you want to block a list of Ip's / SteamID's you will have to run a script on your webspace which acts as proxy.
Q: What would an omnipotent computer to?
A: Get rid of humanity!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)