Team Fortress 2

Team Fortress 2

59 ratings
How to Secure Your Local Server
By Tututerokツ雨 and 1 collaborators
Since the update, there have been reports from TF2 players that real people were joining their *offline* servers, which caused stress, panic, and confusion within the community.

If you need help protecting your local server from strangers, then this guide is for you!



**Added more detailed options for server visibility and privacy when creating a server

The "Use Steam Networking" checkbox has been replaced with a dropdown, allowing the creation of Local, Friends Only, Unlisted and Listed servers -- defaulting to Unlisted

Using map command by default will no longer create a join-able game
**
2
   
Award
Favorite
Favorited
Unfavorite
The Solution
Uncheck the "Use Steam Networking" setting when creating a server.







The console variable that does the exact same thing you can set using the console and putting in /Team Fortress 2/tf/cfg/autoexec.cfg (create the .cfg in case you don't have it and then open it like it's a text file) so it executes automatically when you launch the game is:
sv_use_steam_networking 0
When set to '1', if you haven't changed some other console variables, your server appears in the server list and allows players to connect to it. '0' prevents that.

If you changed the console variable after creating a server and still get people, you should try setting things up before starting the server!
Additionally/Alternatively
You can set the console variables to these numbers using the console or put them in your autoexec.cfg:
sv_lan 1 // restricts server connections to local area network only <--> makes it so only people on your network can connect to the server

hide_server 1 // hides your server from the server list
(*in addition, could be useful if you don't want to password your server while having sv_use_steam_networking set to '1' to share the IP of the server to other people so they could connect to it)
tf_mm_strict 2 // sets 'hidden' tag for the server list
(*could be used for the same purpose)

*an assumption

Although, sv_lan 1 alone should be enough.

You can also add extra protection with/instead use
sv_password SOMETHING
to password your server to avoid randoms and so only people who know the code are able to join your server.

If you're using the console to join a server like that, the password needs to be entered at the same time as the connect command with the IP:
connect ???.???.?.?; password SOMETHING

*Don't forget to change the variables back to their original values whenever you want your server to be visible and connectable.

You can enter a console variable without a number in the console so it says the default value of it. If you see nothing, then type:
con_filter_enable 0
And try again.

Reminder: If you messed with the console variables after launching a server but still get randoms, you should try setting them up before starting up your server
tl;dr
sv_use_steam_networking 0 [+] sv_lan 1 for best security
(before hosting the server)

Also,
if you need further assistance, let me know in the comments and I'll help you.
1 Comments
Tutu 💚™❤️ ~^^)  [author] 10 Mar @ 11:32pm 
Off-topic info about making your server connectable and visible is now [spoiler]