My site got hit ddos several times till now, i found that ddos traffic generally comes from linux os ... then, i wonder how to block linux users / traffic from accessing a site with htaccess??
Please advice..
My site got hit ddos several times till now, i found that ddos traffic generally comes from linux os ... then, i wonder how to block linux users / traffic from accessing a site with htaccess??
Please advice..
The short answer is that you can't.
The long answer: I doubt your solution is a sound one.
First, it might not be the best business practice to make your site unavailable to a bunch of people. Some of your customers might use Linux, and if they can't reach your page, they probably won't try again (I certainly wouldn't). This of course depends on what is on the page, so you might not see it as a strong point.
Second, by the time your server gets to the point of checking the client and deciding if the connection should be denied, it is already too late. The connection is already established, so in the case of a DDoS attack, you will gain next to nothing with this approach. This holds to any kind of checks done with htaccess, in fact, to any kind of checks done by your server (even by a firewall).
You might want to see this post about DDoS attacks, as it lists solutions to the problem which could actually work.