NB! It seems this console command is not compatible with CS2.
Command Profile

CL_HIDESERVERIP

CS:GO

This console command is used to hide the IP of your server in your console. This is particularly useful if you're streaming and don't want viewers to be able to catch your IP address, giving them the chance the DDoS the server.

Syntax
cl_hideserverip [0 / 1]

Description

This console command is used to hide the IP of your server in your console. This is particularly useful if you're streaming and don't want viewers to be able to catch your IP address, giving them the chance the DDoS the server.

How To Use cl_hideserverip

  1. Enable the developer console in Counter-Strike settings.
  2. Open the console with the tilde key (~).
  3. Enter cl_hideserverip [0 / 1], replacing bracketed arguments with the value you want, then press Enter.

This legacy command is not currently listed as compatible with Counter-Strike 2.

Syntax And Arguments

cl_hideserverip [0 / 1]
0 / 1 Use a 1 after this command to activate the hide IP command, and a 0 to turn the command off. Using the command "status" will still show the IP, though.