Counter-Strike 2 Field guide

CS2 Accepts Players but Fails Steam A2S Queries: Diagnosing Server Browser Visibility and UDP Ports

Diagnosing Counter-Strike 2 Steam Server Browser visibility: resolving A2S_INFO query failures, game and query UDP port separation, iptables firewall, and packet inspection.

CS2 Accepts Players but Fails Steam A2S Queries: Diagnosing Server Browser Visibility and UDP Ports

Counter-Strike 2 dedicated server administrators frequently face a frustrating paradox: players can connect directly using the developer console via connect <IP>:27015, yet the server remains completely invisible within the global Steam Community Server Browser and external status monitoring services report the host as «Offline».

In this practical guide, we break down the two-stage Valve A2S_INFO query protocol, develop a lightweight Python socket diagnostic probe, inspect iptables UDP filtering rules, and configure GSLT authentication for Steam master server registration.

Anatomy of Valve A2S_INFO Queries and Source 2 Challenges#

To display server metadata (server title, current map, active player counts, bot counts, tags) within the server browser, Steam relies on the Valve Source Query (A2S) protocol.

In Source 2, queries execute through a challenge-response handshake:

  1. The client sends a datagram: \xFF\xFF\xFF\xFFTSource Engine Query\x00.
  2. The CS2 engine responds with a challenge packet: 0xFF 0xFF 0xFF 0xFF 0x41 <4-byte-token>.
  3. The client echoes the query with the challenge token appended.
  4. The server returns the requested A2S_INFO payload.

If an intermediate firewall drops unsolicited UDP packets or flags consecutive queries as an amplification flood, external browser scanners timeout.

Verify that the cs2 process is bound to the UDP network interface:

bash
ss -ulnp | grep -E "cs2|27015"

Testing A2S Query Socket Responses via Python#

To verify whether the server engine responds to A2S protocol packets, execute a local socket diagnostic:

bash
python3 - << 'EOF'
import socket

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.settimeout(3.0)
target = ("127.0.0.1", 27015)

query = b"\xFF\xFF\xFF\xFFTSource Engine Query\x00"
sock.sendto(query, target)

try:
    data, addr = sock.recvfrom(1400)
    print(f"Initial response header: {data[:5]}")
    if len(data) >= 9 and data[4:5] == b"\x41":
        challenge = data[5:9]
        sock.sendto(query + challenge, target)
        data, addr = sock.recvfrom(1400)
        print("Success: A2S_INFO payload received, size:", len(data))
except socket.timeout:
    print("Failure: A2S query timed out.")
finally:
    sock.close()
EOF

If the probe succeeds locally but times out when invoked from an external machine, the bottleneck is isolated to perimeter firewall configurations or upstream routing.

Auditing UFW, iptables, and UDP Rate Limiting#

A common source of dropped queries is overly aggressive anti-DDoS rate-limiting rules that mistakenly categorize legitimate A2S monitoring polling as UDP flood attacks.

Inspect iptables drop counters for port 27015:

bash
sudo iptables -L -n -v | grep -E "27015|DROP"

Ensure your firewall explicitly permits inbound UDP traffic on port 27015:

bash
sudo ufw allow 27015/udp
sudo iptables -I INPUT -p udp --dport 27015 -j ACCEPT

GSLT Token Configuration and Steam Master Server Registration#

A CS2 dedicated server cannot publish heartbeats to the global Steam directory without an authenticated Game Server Login Token (GSLT).

Check your configuration inside game/csgo/cfg/server.cfg:

bash
grep -E "sv_setsteamaccount|sv_lan" /opt/cs2/game/csgo/cfg/server.cfg

Ensure sv_lan is disabled (sv_lan 0) and register a valid GSLT token generated via the Steam Game Server Account Management portal for AppID 730:

bash
echo 'sv_lan 0' >> /opt/cs2/game/csgo/cfg/server.cfg
echo 'sv_setsteamaccount "YOUR_GSLT_TOKEN"' >> /opt/cs2/game/csgo/cfg/server.cfg

Upon restart, the server transmits heartbeat datagrams to Valve master servers, confirming account ownership and enabling public discovery.

If you are looking for high-performance Counter-Strike 2 server hosting with automated Steam browser visibility, advanced DDoS mitigation, and enterprise low-latency routing, modern CS2 server hosting delivers instant deployment and pre-configured network ports.

References#