Here’s how to filter or block ICMP timestamp requests and replies.
On Redhat/CentOS, edit /etc/sysconfig/iptables and add the following lines
1 2 |
-A RH-Firewall-1-INPUT -p ICMP --icmp-type timestamp-request -j DROP -A RH-Firewall-1-INPUT -p ICMP --icmp-type timestamp-reply -j DROP |
and then run:
1 |
/sbin/iptables restart |
Or run the following commands:
1 2 3 |
/sbin/iptables -I RH-Firewall-1-INPUT 1 -p ICMP --icmp-type timestamp-request -j DROP /sbin/iptables -I RH-Firewall-1-INPUT 1 -p ICMP --icmp-type timestamp-reply -j DROP /sbin/service iptables save |
Recently on an Ubantu server we just added these lines to /etc/rc.local:
1 2 |
/sbin/iptables -I INPUT 1 -p ICMP --icmp-type timestamp-request -j DROP /sbin/iptables -I INPUT 1 -p ICMP --icmp-type timestamp-reply -j DROP |