Created
July 27, 2021 09:54
-
-
Save latuminggi/04baf2f3663a9b83be15308b3fe3ca64 to your computer and use it in GitHub Desktop.
Disable ICMP Timestamp Response Ubuntu LTS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Disable ICMP Timestamp Response Ubuntu LTS ### | |
# sysctl disable tcp_timestamps | |
echo 0 > /proc/sys/net/ipv4/tcp_timestamps && \ | |
echo "net.ipv4.tcp_timestamps = 0" > /etc/sysctl.d/tcp_timestamps.conf && \ | |
sysctl -p && \ | |
sysctl -a | grep "net\.ipv4\.tcp_timestamps" | |
# open icmp to specified segment | |
iptables -A INPUT -s 10.10.0.0/16 -p icmp -m icmp --icmp-type 8 -j ACCEPT | |
# delete icmp echo-request | |
iptables -D ufw-before-forward -p icmp -m icmp --icmp-type 8 -j ACCEPT && \ | |
iptables -D ufw-before-input -p icmp -m icmp --icmp-type 8 -j ACCEPT | |
# check icmp echo-request | |
iptables -L | grep icmp | grep echo-request | |
# check by ping | |
ping YourServerIPv4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment