From 6bee859a12623d0b04d3672fade41b8b181bdb19 Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Sun, 2 Dec 2001 06:03:03 +0000 Subject: added sysctl.conf, host.conf and /etc/issue{.net} customization. --- init-sh/level5.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'init-sh/level5.sh') diff --git a/init-sh/level5.sh b/init-sh/level5.sh index 1fa9a9d..070c770 100755 --- a/init-sh/level5.sh +++ b/init-sh/level5.sh @@ -123,6 +123,39 @@ if [[ -f /lib/libsafe.so.2 ]]; then AddRules "/lib/libsafe.so.2" /etc/ld.so.preload fi +# Console timeout +echo "Setting console timeout :" +AddRules "TMOUT=180" /etc/sysconfig/msec + +# No history file +echo "No history file :" +AddRules "HISTFILESIZE=0" /etc/sysconfig/msec + +# Ip spoofing protection +echo "IP spoofing protection :" +AddRules "nospoof on" /etc/host.conf +AddRules "spoofalert on" /etc/host.conf + +# icmp echo +echo "Ignoring icmp echo :" +AddRules "net.ipv4.icmp_echo_ignore_all=1" /etc/sysctl.conf +AddRules "net.ipv4.icmp_echo_ignore_broadcasts=1" /etc/sysctl.conf + +# bad error +echo "Enabling bad error message Protection :" +AddRules "net.ipv4.icmp_ignore_bogus_error_responses=1" /etc/sysctl.conf + +# log strange packets +echo "Enabling logging Spoofed Packets, Source Routed Packets, Redirect Packets :" +AddRules "net.ipv4.conf.all.log_martians=1" /etc/sysctl.conf + +LoadSysctl + +# issues +echo "Removing /etc/issue and /etc/issue.net :" +RemoveIssue +RemoveIssueNet + # Do not boot on a shell ForbidReboot ForbidAutologin -- cgit v1.2.1