Skip to content

Commit

Permalink
disable icmp timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbtek committed Feb 22, 2019
1 parent fe4e41a commit 1c38ed0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions cookbooks/tweaks/recipes/disable-icmp-timestamp.bash
Original file line number Diff line number Diff line change
@@ -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 "${@}"
1 change: 1 addition & 0 deletions cookbooks/tweaks/recipes/install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down

0 comments on commit 1c38ed0

Please sign in to comment.