Disable TCP and ICMP Timestamps

From Whonix


Disable TCP Timestamps[edit]

The downside of TCP timestamps is adversaries can remotely calculate the system uptime and boot time of the machine and the host's clock down to millisecond precision. These calculated uptimes and boot times can also help to detect hidden network-enabled operating systems, as well as link spoofed IP and MAC addresses together and more. [1]

To prevent this information leaking to an adversary, it is recommended to disable TCP timestamps on any operating systems in use. The less information available to attackers, the better the security.


To temporarily disable TCP timestamps for testing purposes (rather than permanently), see the footnote. [2]

1. Open a terminal (Konsole).

Become root.

sudo su

2. Add the following line to /etc/sysctl.d/tcp_timestamps.conf

net.ipv4.tcp_timestamps = 0

To do that, use the following command.

echo "net.ipv4.tcp_timestamps = 0" > /etc/sysctl.d/tcp_timestamps.conf

3. To apply the sysctl settings without a reboot, run the following command.

sysctl -p /etc/sysctl.d/tcp_timestamps.conf

4. Check if the changes have been properly set.

sysctl -a

If it worked correctly, the system should provide the following output.

net.ipv4.tcp_timestamps = 0


Info This procedure is untested. It should also work for BSD-like operating systems.

Disable the rfc1323 protocol which handles TCP timestamps.

1. To check system-set TCP values, run. [3]

sysctl net.inet.tcp

A value of 1 against net.inet.tcp.rfc1323 indicates it is enabled, while 0 indicates it is disabled.

2. Disable TCP timestamps permanently or temporarily.

To permanently disable TCP timestamps, run. [4] [5]

sudo su

echo net.inet.tcp.rfc1323=0 > /etc/sysctl.conf

To temporarily disable TCP timestamps (until reboot) for testing purposes, run.

sudo sysctl -w net.inet.tcp.rfc1323=0


TCP timestamps are disabled by default in Qubes R3.1 and above. [6]


Info Administrator privileges are required.

To disable (outgoing [7]) TCP timestamps on Windows, run the following root command. [8]

netsh int tcp set global timestamps=disabled

Disable ICMP Timestamps[edit]

The Internet Control Message Protocol (ICMP) is used by network devices, including routers, to send operational information and error messages such as whether a service is available or if a host/router cannot be reached. Unlike TCP and UDP, it is a network level, not transport layer protocol. Commonly network utilities are based on ICMP messages, such as traceroute and ping. [9]

The ICMP protocol includes timestamps for time synchronization, with the originating timestamp being set to the time (in milliseconds since midnight) since the sender last touched the packet. A timestamp reply is also generated, consisting of the originating timestamp (sent by the sender) as well as a "receive timestamp", which captures when the timestamp was received and a reply sent. [10]


ICMP timestamps need to be blocked with the firewall. [11] This is distribution dependent and varies widely as does having a firewall enabled on your specific OS. Be aware that some distributions do not turn on the firewall by default.

There are various ways to block ICMP timestamps on the command line, therefore it is recommended to consult your specific distribution's documentation. [12] The easiest method is to download a GUI front-end (like gufw [archive]), then configure the firewall to silently drop all incoming connections by default, and only allow outgoing traffic from the machine.


Info This is untested.

MacOS systems should have ICMP timestamps disabled by default. This means if the firewall is enabled and "Stealth Mode" is set, the system should not respond to any ICMP requests. Follow these steps to check the system is properly secured: [13]

  1. Click Menu
  2. Select System Preferences
  3. Select Security & Privacy
  4. Click the Firewall tab
  5. Check the firewall is On
  6. Click Firewall Options
  7. Enable Stealth Mode
  8. Click OK

The "Block all incoming connections" option should also be checked for greater security.

It is also possible to manually change / check the ICMP timestamp status -- refer to the system variable net.inet.icmp.timestamp in the /etc/sysctl.conf file. [14]

To permanently disable ICMP timestamps, run. [15]

sudo sh -c "echo net.inet.icmp.timestamp=0 >> /etc/sysctl.conf"


Info This is untested.

The easiest solution is to configure the firewall to block incoming and outgoing ICMP packets with ICMP types 13 (timestamp request) and 14 (timestamp response). [16]

Alternatively, set net.inet.icmp.tstamprepl to 0 (it is enabled by default). In a terminal, run.

sysctl -w net.inet.icmp.tstamprepl=0


ICMP timestamps are disabled by default in Qubes R3.1 and above. [17]


Info This is untested. After performing these steps, explicitly check this setting is disabled.

The firewall in recent Windows operating systems (Win 10, Win 8/8.1, Win 7) should have ICMP disabled by default. [18]

From the Menu[edit]

The status of ICMP timestamps can be manually checked and changed on Windows systems via the Firewall settings. [19]

Right-click on Start buttonSelect Control PanelSelect Windows FirewallSelect Advanced Settings tab

The ICMP Settings dialog box should show the ICMP timestamp is disabled: Allow incoming timestamp request is unchecked. [20]

From the Command Line[edit]

ICMP timestamp responses can be disabled via the netsh command line utility. This is necessary for Vista and earlier Windows versions. [21]

Open a terminal and run this command as root (administrator).

netsh firewall set icmpsetting 13 disable

Outgoing ICMP timestamp responses are now blocked.


  1. [archive]
  2. Note: If a permanent solution is desired, skip this temporary option and apply the chapter's main instructions instead. To dynamically disable TCP timestamping on Linux (Qubes: in the NetVM). Become root.
    sudo su

    Disable TCP timestamps.

    echo 0 > /proc/sys/net/ipv4/tcp_timestamps

  3. [archive]
  4. [archive]
  5. [archive]
  6. [archive]
  7. [archive]
  8. [archive]
  9. [archive]
  10. [archive]
  11. Advanced users can of course use IP tables. For example in Debian [archive]: ipchains -p icmp -s $INTIP/0 13 -i $INTIF -j DENY and ipchains -p icmp -s 14 -i $EXTIF -j DENY
  12. For instance, Debian users [archive] can edit the /etc/systcl.conf file manually and add net.ipv4.icmp_echo_ignore_all = 1.
  13. [archive]
  14. [archive]
  15. [archive]
  16. [archive]
  17. [archive]
  18. [archive]
  19. [archive]
  20. [archive]
  21. [archive]

text=Jobs in USA
Jobs in USA

Search engines: YaCy | Qwant | ecosia | MetaGer | peekier | Whonix ™ Wiki

Follow: Twitter.png Facebook.png 1280px-Gab text logo.svg.png Iconfinder news 18421.png Rss.png Matrix logo.svg.png 1024px-Telegram 2019 Logo.svg.png Discourse logo.svg Reddit.jpg Diaspora.png Gnusocial.png Mewe.png 500px-Tumblr Wordmark.svg.png Iconfinder youtube 317714.png 200px-Minds logo.svg.png 200px-Mastodon Logotype (Simple).svg.png 200px-LinkedIn Logo 2013.svg.png

Donate: Donate Bank Wire Paypal Bitcoin accepted here Monero accepted here Contriute

Whonix donate bitcoin.png Monero donate whonix.png United Federation of Planets 1000px.png

Share: Twitter | Facebook

Want to make Whonix safer and more usable? We're looking for helping hands. Check out the Open Issues [archive] and development forum [archive].

https link onion link

This is a wiki. Want to improve this page? Help is welcome and volunteer contributions are happily considered! Read, understand and agree to Conditions for Contributions to Whonix ™, then Edit! Edits are held for moderation. Policy of Whonix Website and Whonix Chat and Policy On Nonfreedom Software applies.

Copyright (C) 2012 - 2020 ENCRYPTED SUPPORT LP. Whonix ™ is a trademark. Whonix ™ is a licensee [archive] of the Open Invention Network [archive]. Unless otherwise noted, the content of this page is copyrighted and licensed under the same Freedom Software license as Whonix ™ itself. (Why?)

Whonix ™ is a derivative of and not affiliated with Debian [archive]. Debian is a registered trademark [archive] owned by Software in the Public Interest, Inc [archive].

Whonix ™ is produced independently from the Tor® [archive] anonymity software and carries no guarantee from The Tor Project [archive] about quality, suitability or anything else.

By using our website, you acknowledge that you have read, understood and agreed to our Privacy Policy, Cookie Policy, Terms of Service, and E-Sign Consent. Whonix ™ is provided by ENCRYPTED SUPPORT LP. See Imprint, Contact.