Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save latuminggi/04baf2f3663a9b83be15308b3fe3ca64 to your computer and use it in GitHub Desktop.
Save latuminggi/04baf2f3663a9b83be15308b3fe3ca64 to your computer and use it in GitHub Desktop.
Disable ICMP Timestamp Response Ubuntu LTS
### 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