TCP 6004

ProtocolTCP
Port6004
LabelsX11—used between an X client and server over the network

Synopsis

  • TCP port 6004 is used by the X Window System (X11) for display number 4 (X servers listen on 6000 + display number).
  • Real-world X11 servers that may open 6004 include X.Org on Linux/Unix, XQuartz on macOS, and Windows X servers such as Xming, OpenText Exceed, and NetSarang Xmanager.
  • It is used when GUI applications connect to an X server running as display :4, including remote UNIX/Linux applications that render over TCP when not using SSH tunneling.
  • This port (like others in 6000–6063) has been targeted in attacks when exposed, allowing keystroke/screen capture or input injection if X11 access controls are misconfigured or absent.
  • Administrators commonly mitigate by disabling TCP listening (e.g., -nolisten tcp) or restricting access via firewalls and xhost/xauth.

Observed activity

Last 30 days Detailed chart

More information