Tuesday, 2 October 2012

Ubuntu - Set Default Priority for all Processes for a Specific User


Hi,
This thing will help you can ssh to server if it attach by DDoS:
  1. Assuming that we have sufficient memory:
    • sudo vi /etc/security/limits.conf
  2. The configuration syntax is as follow:
    • [username] [hard|soft] priority [nice value]
  3. Insert the following line:
    • www-data hard priority 10
      • priority: -20 - 10
  4. Now, reboot the server.
  5. To verify that you've done it correctly, run top or htop:
    • Check NI column and check a number

Good luck!

No comments:

Post a Comment