Se protéger des fork Bomb
kevin76110
Messages postés
4273
Date d'inscription
Statut
Membre
Dernière intervention
-
zipe31 Messages postés 36402 Date d'inscription Statut Contributeur Dernière intervention -
zipe31 Messages postés 36402 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
Je cherche à me protéger des fork bomb.
J'ai trouvé ceci :
http://doc.ubuntu-fr.org/tutoriel/comment_se_proteger_des_fork_bomb
Seulement, lorsque j'édite limits.conf, rien ne se passe ( ulimit -u me renvoie unlimited).
Bon ... J'ai l'habitude que rien ne fonctionne du premier coup ...
Je case session required /lib/security/pam_limits.so
dans
*
/etc/pam.d/common-session
*
/etc/pam.d/login
*
/etc/pam.d/su
*
/etc/pam.d/xdm
*
/etc/pam.d/gdm
*
/etc/pam.d/sshd
Ainsi que UsePAM yes
Je redémarre le PC, et là je tape ulimit -u, le PC me renvoie unlimited au lieu de 100.
Quelqu'un pourrait m'aider à me protéger des fork bomb ? Ou me dire ce que j'ai loupé dans ma manip' ?
Merci d'avance,
Kévin.
Je cherche à me protéger des fork bomb.
J'ai trouvé ceci :
http://doc.ubuntu-fr.org/tutoriel/comment_se_proteger_des_fork_bomb
Seulement, lorsque j'édite limits.conf, rien ne se passe ( ulimit -u me renvoie unlimited).
Bon ... J'ai l'habitude que rien ne fonctionne du premier coup ...
Je case session required /lib/security/pam_limits.so
dans
*
/etc/pam.d/common-session
*
/etc/pam.d/login
*
/etc/pam.d/su
*
/etc/pam.d/xdm
*
/etc/pam.d/gdm
*
/etc/pam.d/sshd
Ainsi que UsePAM yes
Je redémarre le PC, et là je tape ulimit -u, le PC me renvoie unlimited au lieu de 100.
Quelqu'un pourrait m'aider à me protéger des fork bomb ? Ou me dire ce que j'ai loupé dans ma manip' ?
Merci d'avance,
Kévin.
A voir également:
- Se protéger des fork Bomb
- Protéger des cellules excel - Guide
- Protéger un dossier par mot de passe - Guide
- Protéger un pdf par mot de passe - Guide
- Comment protéger sa photo de profil whatsapp - Guide
- Protéger un document word - Guide
4 réponses
Le voici :
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
# - NOTE: group and wildcard limits are not applied to root.
# To apply a limit to the root user, <domain> must be
# the literal username root.
#
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
#<item> can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit (KB)
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to values: [-20, 19]
# - rtprio - max realtime priority
# - chroot - change root to directory (Debian-specific)
#
#<domain> <type> <item> <value>
#
#* soft core 0
#root hard core 100000
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#ftp - chroot /ftp
#@student - maxlogins 4
#* hard nproc 100
# End of file
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
# - NOTE: group and wildcard limits are not applied to root.
# To apply a limit to the root user, <domain> must be
# the literal username root.
#
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
#<item> can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit (KB)
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to values: [-20, 19]
# - rtprio - max realtime priority
# - chroot - change root to directory (Debian-specific)
#
#<domain> <type> <item> <value>
#
#* soft core 0
#root hard core 100000
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#ftp - chroot /ftp
#@student - maxlogins 4
#* hard nproc 100
# End of file
Je te donne ce lien qui me semble très intéressant et complet. Si ça ne suffit pas, hésite pas à revenir ici. Je suis le post.
Sujet très intéressant.
http://xhanch.com/web-server-limit-resource-usage-per-user-via-limits-conf/
Sujet très intéressant.
http://xhanch.com/web-server-limit-resource-usage-per-user-via-limits-conf/
En décommentant la ligne ça devrait le faire on ne peut mieux ;-\
C'est le principe même des dièses (#) qui servent à commenter les lignes afin d'y apposer un commentaire ou d'empêcher une ligne d'être prise en compte ;-))