diff --git a/cookbooks/tweaks/recipes/disable-icmp-timestamp.bash b/cookbooks/tweaks/recipes/disable-icmp-timestamp.bash new file mode 100755 index 00000000..637eabaa --- /dev/null +++ b/cookbooks/tweaks/recipes/disable-icmp-timestamp.bash @@ -0,0 +1,27 @@ +#!/bin/bash -e + +function install() +{ + umask '0022' + + iptables -A INPUT -p ICMP --icmp-type timestamp-request -j DROP + iptables -A INPUT -p ICMP --icmp-type timestamp-reply -j DROP + iptables-save + + umask '0077' +} + +function main() +{ + source "$(dirname "${BASH_SOURCE[0]}")/../../../libraries/util.bash" + + checkRequireLinuxSystem + checkRequireRootUser + + header 'DISABLING ICMP-TIMESTAMP' + + install + installCleanUp +} + +main "${@}" \ No newline at end of file diff --git a/cookbooks/tweaks/recipes/install.bash b/cookbooks/tweaks/recipes/install.bash index f81c8f5e..3542f086 100755 --- a/cookbooks/tweaks/recipes/install.bash +++ b/cookbooks/tweaks/recipes/install.bash @@ -5,6 +5,7 @@ function main() local -r appFolderPath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" "${appFolderPath}/disable-hugepage.bash" + "${appFolderPath}/disable-icmp-timestamp.bash" "${appFolderPath}/disable-tcp-timestamp.bash" }