Skip to content

Instantly share code, notes, and snippets.

@rtldg
Last active December 2, 2025 18:34
Show Gist options
  • Select an option

  • Save rtldg/9e6ea7aa9b37388c119d31043b7f5189 to your computer and use it in GitHub Desktop.

Select an option

Save rtldg/9e6ea7aa9b37388c119d31043b7f5189 to your computer and use it in GitHub Desktop.
Steam Datagram Relay / Steam Networking FAQ

What is Steam Datagram Relay / Steam Networking?

Resources:

Steam Networking is a bundle of APIs that do a lot of things and most notably support Steam Datagram Relay, which is provided by Valve to proxy connections to your server/SRCDS, to protect your server/SRCDS from DDOS, and provide P2P support.

Previously, if you could not port-forward your SRCDS server's ports, it would only work as a LAN server and other players wouldn't be able to join.

With Steam Networking, players can connect to your server without the server's IP being revealed, and without the other players IPs from being revealed[1].

[1]: Things such as MOTD or HTML pages can still leak player IPs to the server operator.

How do I use Steam Datagram Relay / Steam Networking on my SRCDS server?

Add +sv_use_steam_networking 1 to your launch options in SRCDS. It's probably possible to put it in a .cfg file too but it hasn't been thoroughly tested.

Your SRCDS console will probably log some messages like this:

Requesting FakeIP as per -enablefakeip
...
Connection to Steam servers successful.
[SteamNetworkingSockets] SDR network config fetch attempt #1 failed.  HTTP 504.  .  Trying again.
   Public IP to Steam is <YOUR ACTUAL IP HERE>.
Assigned persistent gameserver Steam ID [G:1:???????].
FakeIP allocation succeeded: 169.254.224.83:20232, 20233

With that, you'd connect 169.254.224.83:20232 in your game and then you'd be in the server!

How can I grab the "FakeIP" from a SourceMod plugin?

TODO: I'm working on a plugin for this. It's not available at this moment.

Can I add a server's "fake IP" to my favorites?

Not really yet. It should be possible eventually though, probably requiring your server to use a game server token from https://steamcommunity.com/dev/managegameservers

Why would I want to use this?

  • You can prevent your SRCDS server from being DDOS'd as easily.
  • You can hide your SRCDS server's IP entirely.
  • You can setup a LAN server and other players would be able to join easily.
  • You host a matchmaking server (think FACEIT, popflash.site, and serveme.tf (<- which does use it!)) and you want to spin up a temporary server & IP for each match.

Internals

FakeIPs are in the 169.254.0.0 to 169.254.255.255 range (wikipedia). These are not externally accessibly but through the magic of Steam Networking, it will be joinable ingame.

FakeIP allocations can include multiple ports: FakeIP allocation succeeded: 169.254.224.83:20232, 20233 This gives you the 20232 and 20233 port.

SDR connections provide slightly better player authentication that prevents SteamID spoofing. (TODO: find the page that is the source of this)

Starting to connect to an SDR will in most cases take longer than it would with a regular non-SDR server. (maybe 1-3 seconds before your game starts to join).

  • Normal connection: game <-> server
  • SDR connection: game <-> (encrypted & authentication sprinkled in) Steam <-> server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment