Device Ban on Website?

germanweb

Registered Member
Joined
Oct 30, 2017
Messages
95
Reaction score
5
Hello Guys,

Is there a way to ban a certain device on my website?

Im blocking already the IP Adress but the guy keeps changing his IP and has access again to my website.

Is there a other way to ban a user from accessing my Website via Device oder something?

Greetings
 
Are you using Apache? Yupp, you could do it through your htaccess.

Try this:
Code:
https://stackoverflow.com/a/50288542/1437261

You could use a combination too. For example, ban the IP + set a cookie for banned devices + track device type ( browser agent has info about that).

If you are trying to block bots, then you could use re-captcha too (Like cloudflare does).
 
recommend you to pay on protection services or try to use free service like cloudflare.
 
recommend you to pay on protection services or try to use free service like cloudflare.
Im am using cloudflare already.

Is there a other way to block user besides IP Adresses in Cloudflare?
 
Are you using Apache? Yupp, you could do it through your htaccess.

Try this:
Code:
https://stackoverflow.com/a/50288542/1437261

You could use a combination too. For example, ban the IP + set a cookie for banned devices + track device type ( browser agent has info about that).

If you are trying to block bots, then you could use re-captcha too (Like cloudflare does).

I have a wordpress site with shared hosting. The Server ist using apache. How can I block special devices via .htaccess?
 
Your answer is to use fingerprint bans, look it up and it should solve your issue once you get enough data to pinpoint his fingerprint and prevent false flags
 
I have a wordpress site with shared hosting. The Server ist using apache. How can I block special devices via .htaccess?
What "special devices" are you trying to block? That's the first thing you need to find out. Let me know here, and I will try giving you a code.

Your answer is to use fingerprint bans, look it up and it should solve your issue once you get enough data to pinpoint his fingerprint and prevent false flags

Yupp, I also believe fingerprint based ban would be the most suitable thing to do in OP's case.
I dunno how effective the following script is, but give it a try OP:
Code:
https://github.com/Valve/fingerprintjs2

Hopefully, that will solve your problem. They claim that the pro version of their script has accuracy of 99.5%. If true, that should be pretty good. I haven't tried them though.
 
Your answer is to use fingerprint bans, look it up and it should solve your issue once you get enough data to pinpoint his fingerprint and prevent false flags

Where can i get some more Infos on fingerprint bans?
 
What "special devices" are you trying to block? That's the first thing you need to find out. Let me know here, and I will try giving you a code.

Im NOT trying to block like all Androids oder all Samsung Devices. Im only trying to block certain Device from Person X so not all Devices only Devices from special Users. Is something like this possible via Cookies or something?
 
Im NOT trying to block like all Androids oder all Samsung Devices. Im only trying to block certain Device from Person X so not all Devices only Devices from special Users. Is something like this possible via Cookies or something?
What are those specific devices?

htaccess example:
Code:
RewriteCond %{HTTP_USER_AGENT} Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu HeadlessChrome HeadlessChrome Safari/537.36
RewriteRule .* - [R=403,L]

Actually, fingerprints can be changed easily. It's not 100% guarantee.
Easier said than done, but yupp.. Surely, it can be changed. Fingerprints can't be trusted completely. :)
 
What are those specific devices?

htaccess example:
Code:
RewriteCond %{HTTP_USER_AGENT} Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu HeadlessChrome HeadlessChrome Safari/537.36
RewriteRule .* - [R=403,L]


Easier said than done, but yupp.. Surely, it can be changed. Fingerprints can't be trusted completely. :)


Which Information do you need exactly from we from those deviceS?
 
Which Information do you need exactly from we from those deviceS?
Dude... I just gave you the rewrite condition.. How am I supposed to know which browser agents are you trying to block? See your log, choose the bad ones and block them using the code I gave you.
 
Rarely can you fully block an attacker to access your website.
Instead of blocking him, why not serve him garbage data / return random nonsense?
 
Actually, fingerprints can be changed easily. It's not 100% guarantee.
It can be changed, but most trolls won't even know how to do it. You never stop fingerprinting, you collect data and keep getting rid of the trolls until they give up, some can be persistent and come back every so often. We usually redirect them to a troll YT video.

You can never stop someone with 100% success, but you can make it difficult enough for the troll to stop, because he keeps getting caught.
 
It can be changed, but most trolls won't even know how to do it. You never stop fingerprinting, you collect data and keep getting rid of the trolls until they give up, some can be persistent and come back every so often. We usually redirect them to a troll YT video.

You can never stop someone with 100% success, but you can make it difficult enough for the troll to stop, because he keeps getting caught.

Hey Bus,

Can you please tell me how does this process work? How can i integrate it on my website?
 
Rarely can you fully block an attacker to access your website.
Instead of blocking him, why not serve him garbage data / return random nonsense?

How can I serve him garbage? What exactly do you mean?
 
Depends on why you want to block certain device/user. Is he harrasing your site manually, botting or smtn? If he's doing it manually and he's some normal tech guy, he'll be able to bypass it easily with VM's/ Proxy's/ VPN's and other sh1t. But if you want to stop him for spamming / botting your site there are a lot of methods to stop it. :)
 
Back
Top