Update
This commit is contained in:
3
12-hardening/limits.conf
Normal file
3
12-hardening/limits.conf
Normal file
@ -0,0 +1,3 @@
|
||||
* hard core 0
|
||||
* soft nproc 1000
|
||||
* hard nproc 2000
|
18
12-hardening/script.sh
Normal file
18
12-hardening/script.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# Pour la configuration Hardening
|
||||
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NOCOLOR='\033[0m'
|
||||
|
||||
echo "${YELLOW} ** ${NOCOLOR} Début du script : 12-Hardening"
|
||||
echo "${NOCOLOR}"
|
||||
|
||||
cp 12-hardening/sysctl.conf /etc/sysctl.conf >> /dev/null
|
||||
|
||||
sysctl -p
|
||||
|
||||
cp 12-hardening/limits.conf /etc/security/limits.conf >> /dev/null
|
||||
|
||||
echo "${YELLOW} ** ${NOCOLOR} Fin du script : 12-Hardening"
|
||||
echo "${NOCOLOR}"
|
12
12-hardening/sysctl.conf
Normal file
12
12-hardening/sysctl.conf
Normal file
@ -0,0 +1,12 @@
|
||||
# Protection contre les attaques de type spoofing
|
||||
net.ipv4.conf.all.rp_filter=1
|
||||
net.ipv4.conf.default.rp_filter=1
|
||||
|
||||
# Désactivation du routage IP
|
||||
net.ipv4.ip_forward=0
|
||||
|
||||
# Protection contre les attaques SYN flood
|
||||
net.ipv4.tcp_syncookies=1
|
||||
|
||||
# Ignorer les pings
|
||||
net.ipv4.icmp_echo_ignore_all=1
|
Reference in New Issue
Block a user