Raised This Month: $51 Target: $400
 12% 

Solved [L4D2] Other people can't join my Dedicated Server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Loll10T
Member
Join Date: Jul 2022
Old 07-12-2022 , 17:28   [L4D2] Other people can't join my Dedicated Server
Reply With Quote #1

Edit 24/07/2022 03:41 AM:
According to Bacardi,
Quote:
Originally Posted by Bacardi View Post
Try simple way first:
Code:
srcds.exe -console -game left4dead2 +map c1m1_hotel
Of course, that's a common fix. However, you can try to set these cvars
Quote:
Originally Posted by Bacardi View Post
in ...cfg/server.cfg
Code:
sv_allow_lobby_connect_only 0
sm_cvar sv_hibernate_when_empty 0
Google your own ip (public IP) and share that your friend.
Code:
connect IP:27015
...or recheck port and public IP from status command
And in theory, it should fix the issue. However, we're not done yet. When trying to connect via console, I noticed that for some reason the public IP no longer works (for other people it will, however), so you'll have to connect using your private IP.
So instead of using
Code:
connect 69.420.133.7:27XXX //This is an example IP, duh
you'll have to use
Code:
connect 192.168.x.xxx:27XXX //or whatever your private IP is, if using another adapter or something
instead.

Thanks for the help, everyone. Have a nice one.
Now, if you still want to read the original post, it's down below.

Quote:
Originally Posted by Loll10T View Post
Ports are open, firewall is already configured so there's no connection issues.

I set up a loopback adapter, so I can connect to my public IP (w/o the adapter I could only connect to my private IP, i.e. 192.168.x.xxx).

However, when I invite friends to the lobby and start the game, only I get connected to the server and they get a "Disconnected" message saying that it failed after 10 retries.

I've been searching around AlliedModders and other places but the only "fix" I found was to set up a loopback adapter, as mentioned at the beginning.

Then I found a second workaround, which is creating a local server through the game and installing my SM plugins (also worth noting that in the case of SRCDS I've tried with and without addons).

However, it crashes randomly. It variates and I don't remember how to make the game create a log (other than "-debug" but for some reason it doesn't seem to create a log).
Either way, I'd rather use SRCDS than hosting it through the game.

Parameters I used (inside batch files):

Batch file A
Code:
srcds.exe -autoupdate -steam -debug -condebug -usercon -console -nobreakpad -insecure -dev -game left4dead2 +map c1m1_hotel +hostip <publicIP>
Batch file B
Code:
start "" "%~dp0\srcds.exe" -autoupdate -steam -debug -condebug -usercon -console -nobreakpad -secure -dev -game left4dead2 +ip <privateIP> +hostip <publicIP> +port 27017 +clientport 27017 +hostname "The Hellhole of the Elliot" +map credits +maxplayers 8 +exec server.cfg +sv_lan 0 +sv_pure 0 +sv_consistency 0
Do I give up?

I'm not sure if this is the right place to post it, but I just can't find an answer.

Last edited by Loll10T; 07-24-2022 at 04:50. Reason: Solved, using preffix and separating fix from original post.
Loll10T is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-14-2022 , 02:50   Re: [L4D2] Other people can't join my Dedicated Server
Reply With Quote #2

Launch your server and use command "status". What console print out ?
Bacardi is offline
Loll10T
Member
Join Date: Jul 2022
Old 07-15-2022 , 21:37   Re: [L4D2] Other people can't join my Dedicated Server
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
Launch your server and use command "status". What console print out ?
Code:
CPU   In    Out   Uptime  Users   FPS    Players
2.05  0.00  0.00       0     0   29.62       0
hostname: The Hellhole of The Elliot
version : 2.2.2.5 8490 insecure  (unknown)
udp/ip  : PrivateIP:27016 [ public PublicIP:27016 ]
os      : Windows Dedicated
map     : c1m1_hotel
players : 0 humans, 0 bots (8 max) (hibernating) (unreserved)
# userid name uniqueid connected ping loss state rate adr
[there are no players, duh]
#end
Using "stats;status"

Last edited by Loll10T; 07-15-2022 at 21:38.
Loll10T is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-16-2022 , 10:46   Re: [L4D2] Other people can't join my Dedicated Server
Reply With Quote #4

Does your private IP start 192.168.x.x ?

Your public IP, is not in these IP range ?
Code:
10.0.0.0 — 10.255.255.255;
172.16.0.0 — 172.31.255.255; 
192.168.0.0 — 192.168.255.255
__________________
Do not Private Message @me
Bacardi is offline
Loll10T
Member
Join Date: Jul 2022
Old 07-17-2022 , 00:23   Re: [L4D2] Other people can't join my Dedicated Server
Reply With Quote #5

Quote:
Originally Posted by Bacardi View Post
Does your private IP start 192.168.x.x ?

Your public IP, is not in these IP range ?
Code:
10.0.0.0 — 10.255.255.255;
172.16.0.0 — 172.31.255.255; 
192.168.0.0 — 192.168.255.255
Yes, my private IP starts with 192.168.x.xxx; my public IP is different and I no longer use the net_addr thingy.
Loll10T is offline
nidzo
Junior Member
Join Date: Dec 2019
Old 07-18-2022 , 11:07   Re: [L4D2] Other people can't join my Dedicated Server
Reply With Quote #6

Hello. I have been running a L4D2 for the past three years on a dedicated machine in Linux. What I've had as a problem from the very start was that everybody else COULD connect to the server from the lobby while I could NOT. Maybe due to the fact that the server and the client (my PC) are using the same IP address and the ISP would have firewall rules that forbid this. So a friend suggested that I start the server with the public address of 0.0.0.0 and after that it was working. I could connect to my own server from the lobby.
Here is the line that I am using to start the linux server.
Code:
screen -L -Logfile /home/user_name/l4d2_server_02.log -S l4d2 ~/l4d2_server_02/./srcds_run -tickrate 100 +ip 0.0.0.0 +fps_max 300 -console -game left4dead2 -maxplayers 4 +port 27035 +map c2m1_highway +exec banned_user.cfg; +exec banned_ip.cfg
Hope this can help you. Also make sure that the ports are reachable on your "router" (I call that Internet Service Provider device). And that you have correctly configured (NAT and PORT forwarding) in that same "router". This is very cruical for others to be able to connect to your server.
A link about the difference between NAT and PORT forwarding.
https://superuser.com/questions/4306...ort-forwarding
nidzo is offline
Loll10T
Member
Join Date: Jul 2022
Old 07-18-2022 , 11:27   Re: [L4D2] Other people can't join my Dedicated Server
Reply With Quote #7

Quote:
Originally Posted by nidzo View Post
So a friend suggested that I start the server with the public address of 0.0.0.0 and after that it was working. I could connect to my own server from the lobby.
Tried it before, but I'm not sure if it may actually work given I reconfigured the ports and that I also enabled DMZ.
Either way, I noticed that when hosting the server through the game gives players a 0.0.0.x IP when they join. So, if we connect the dots...

Thanks a lot for your reply. Hopefully this finally helps me fix my issue.
I will post another reply later on, indicating if it worked or not.
Loll10T is offline
Loll10T
Member
Join Date: Jul 2022
Old 07-18-2022 , 16:47   Re: [L4D2] Other people can't join my Dedicated Server
Reply With Quote #8

Update: It doesn't work. Strangely enough, instead of being the only one connected, either the server or the game tries to connect me and for some reason reconnects me, resulting in a infinite loading screen.
Also the IP setting you suggested appears to be for private IP, not public.
I will, however, try to use the same port as your server's.

Update 2: Tested both your port and IP settings, still the same behavior.

Last edited by Loll10T; 07-18-2022 at 16:59.
Loll10T is offline
Loll10T
Member
Join Date: Jul 2022
Old 07-20-2022 , 12:46   Re: [L4D2] Other people can't join my Dedicated Server
Reply With Quote #9

I guess there is no fix then?

Also I read about NAT forwarding, and I found out that it requires enabling DMZ. I did this when I wrote the post, but I forgot to mention that.
Still, I'm not sure if that is enough, as no one seems to be able to connect to my server, but me.

Last edited by Loll10T; 07-20-2022 at 12:49.
Loll10T is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-22-2022 , 09:40   Re: [L4D2] Other people can't join my Dedicated Server
Reply With Quote #10

Try simple way first:
Code:
srcds.exe -console -game left4dead2 +map c1m1_hotel
in ...cfg/server.cfg
Code:
sv_allow_lobby_connect_only 0
sm_cvar sv_hibernate_when_empty 0
Google your own ip (public IP) and share that your friend.
Code:
connect IP:27015
...or recheck port and public IP from status command

*edit
And it would be better to disable hibernation. You need SourceMod sm_cvar command to change hidden cvar sv_hibernate_when_empty

*edit edit
You, yourself, you connect from LAN side. Look server browser LAN tab
__________________
Do not Private Message @me

Last edited by Bacardi; 07-22-2022 at 09:44.
Bacardi is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode