Welcome! Log In Create A New Profile

Advanced

Re: Fake video sharing Android App !!

March 16, 2015 09:58AM
> if ($http_user_agent ~* "Linux;Android 4.2.2") {
> return 403;
> }

Looks correct, but maybe nginx does not like the ";" in the provided
string? To be true, I never used such an rule. But anyhow this isn't the
perfect solution: You're just blocking Android with version 4.2.2 with
that. When an user has a phone with just Android 4 the if won't work.

Just try that, I hope it will work (I'm just guessing):
>> if ($http_user_agent ~* '(Android|android)') {

Regards,
Patrik

On 2015-03-16 14:45, shahzaib shahzaib wrote:
> Hi,
>
> I have installed that android app and requested log against my ip
> is following :
>
> 39.49.52.224 - - [15/Mar/2015:10:40:26 +0500] "GET
> /files/thumbs/2015/03/14/1426310448973c5-1.jpg HTTP/1.1" 200 13096 "-"
> "Dalvik/1.6.0 (Linux; U; Android 4.2.2; GT-S7582 Build/JDQ39)"
>
> where 39.49.52.224 is ip of my modem.
>
> I have also tried blocking specific user agent such as Android but
> neither it worked (sure i am doing something wrong) nor this is the
> correct solution :
>
> if ($http_user_agent ~* "Linux;Android 4.2.2") {
> return 403;
> }
>
> Thanks.
>
> Shahzaib
>
> On Mon, Mar 16, 2015 at 6:28 PM, Francis Daly <francis@daoine.org>
> wrote:
>
>> On Mon, Mar 16, 2015 at 04:09:30PM +0500, shahzaib shahzaib wrote:
>>
>> Hi there,
>>
>>> Webserver is nginx and hotlinking is already enabled but the
>> issue with no
>>> Referer_Header for the requests being generated by this android
>>> application.
>>>
>>> What precautions should we take to prevent this application by
>> using our
>>> server's bandwidth ?
>>
>> You have "the requests that you wish to allow as normal". You have
>> "the
>> requests that you wish not to allow, since they come from this
>> client".
>>
>> What part of the request that nginx sees puts it into the "yes" or
>> "no" bucket?
>>
>> Put that in your configuration, so that "yes" does what happens
>> now,
>> and "no" returns a http error, or returns a different video
>> inviting
>> the client to get your official app.
>>
>> Perhaps their app uses a unique User-Agent header; or all "wanted"
>> clients do include a Referer header?
>>
>> If you can't tell a "good" request from a "bad" one, you probably
>> cannot
>> configure nginx to.
>>
>> f
>> --
>> Francis Daly francis@daoine.org
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx [1]
>
>
>
> Links:
> ------
> [1] http://mailman.nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Fake video sharing Android App !!

shahzaib1232 March 16, 2015 07:10AM

Re: Fake video sharing Android App !!

Gena Makhomed March 16, 2015 07:20AM

Re: Fake video sharing Android App !!

Francis Daly March 16, 2015 09:30AM

Re: Fake video sharing Android App !!

shahzaib1232 March 16, 2015 09:46AM

Re: Fake video sharing Android App !!

Patschi March 16, 2015 09:58AM

Re: Fake video sharing Android App !!

itpp2012 March 16, 2015 10:47AM

Re: Fake video sharing Android App !!

Francis Daly March 16, 2015 10:52AM

Re: Fake video sharing Android App !!

shahzaib1232 March 17, 2015 04:24AM

Re: Fake video sharing Android App !!

itpp2012 March 17, 2015 05:10AM

Re: Fake video sharing Android App !!

shahzaib1232 March 17, 2015 06:14AM

Re: Fake video sharing Android App !!

itpp2012 March 17, 2015 06:38AM

Re: Fake video sharing Android App !!

shahzaib1232 March 17, 2015 07:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 72
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready