You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when the ip parameter in the config files is set to 0.0.0.0 the script prints an error
[ WARN ] Multiple active network interfaces
Manually specify the IP you want to use within the csgoserver script.
Set ip="0.0.0.0" to one of the following:
It prints a warning and then the script exits. Warnings should not should prohibit the server start. Critical events do that.
It is sometimes required to run the server with a 0.0.0.0 ip, because in the case of many srcds-based servers it's needed for many LAN settings.
If you do not have a -ip setting the server will bind it's rcon to 127.0.1.1 and will therefore not be reachable from the network
if you add a -ip setting that is not 0.0.0.0 the server only binds to that ip and does not listen to broadcast traffic anymore, therefore it is not found by the LAN server browser anymore. (sv_lan 1 is required for this to work)
Possible workarounds are modifying the start-parameters and adding a valid ip variable that is not used at all. e.g. adding somethin like this to the lgsm config files:
Thanks for the feedback. I belive the WARN message should be changed to a FAIL instead. As it is a critical error.
The check IP feature is designed to ensure that an IP is correctly set to allow servers to be queried using gsquery, display correct IP details and to bind to the correct IP. Not specifying a specific IP causes issues with LinuxGSM itself and for some game servers it can give odd results, because of this not specifying an IP will prevent the server from starting.
If you are using a LAN IP for example 192.168.1.5 then the IP should be set to that address.
I don't understand what you mean by when you say that setting an IP other than 0.0.0.0 will prevent LAN broadcast as your LAN IP should be set.
it also should be possible to remove the -ip setting from parms all together if it is causing an issue.
I just realized, that the script say [ FAIL ], the wiki article is not up to date.
Regarding the broadcast:
I am using Fistful of Frags, but this should work with any other srcds game.
When using -ip with the correct IP address, then all sockets of the server bind to that IP:
when you open up tcpdump or wireshark you can see the clients query packets via broadcast but no responses from the server (client and server running on the same host, no firewalls in place that could block packets)
sudo tcpdump port 27015 -i any -A
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
09:03:13.779157 IP agony.52503 > 255.255.255.255.27015: UDP, length 25
E..5.0@.@.W_..d.......i..!%[....TSource Engine Query.
sudo tcpdump port 27015 -i any -A
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
09:01:51.928876 IP agony.33146 > 255.255.255.255.27015: UDP, length 25
E..5..@.@.X...d......zi..!%[....TSource Engine Query.
09:01:51.939334 IP agony.27015 > agony.33146: UDP, length 72
E..dV.@.@.....d...d.i..z.PJ.....I.no IP Bind.fof_depot.fof.Shootout......dl..429...i..Zg.$@.........
Only with the second case with the 0.0.0.0 IP bind the server answers the query packets that are send via broadcast.
This means that either srcds is broken since possibly ever or this is intended by srcds which means there is a valid reason to bind to 0.0.0.0.
0.0.0.0 means listening on everything. This should be allowed and is actually needed for many things.
How LinuxGSM should handle it is simple. Allow the use of 0.0.0.0 and simply choose one of the ips (eg the first) for LinuxGSM use as a process listening on all, will listen and respond to any ip unless blocked by a firewall (which is another matter entirely and fall under misconfiguration of firewall).
@991jo the LAN issue does need to be investigated further. However this is an issue with srcds only as far as I am aware. So an exception may have to be made for srcds in LAN mode. This currently would mean that gsquery would not be able to work as it needs an IP to query. A change in the proccess will have to be made but I am not sure the best way to go about this. It will require some thought
@dgibbs64: Here's a big one, servers with failover addresses and DDOS mitigation. If you are forced to bind to a single address you can't utilize that. All my servers utilize this. A common setup for example is detecting a DDOS and nullroute the ip getting attacked. Server still functions properly on the failover.
I just used LinuxGSM today for the first time while setting up a Project Zomboid server and I've hit two issues, the one I posted (python dependency not detected--which is minor since it does not prevent script execution) and this one that I would post myself if it was not already here heh. The server I was setting it up on has currently 6 ipv4 addresses and 6 ipv6.
Nothing can conflict by using 0.0.0.0. 0.0.0.0 is just INADDR_ANY in code if you want to look it up. All it does is listening at any ip address vs binding to a single ip only. You can have N software listening at any address with no problem whatsoever. In fact this is the default in both linux and windows unless specifically set otherwise. The only problem is when you want to use the same port on 2 different pieces of software. At that point though you know what you're doing (you're doing this on purpose) so you can either bind each to a different ip or use different ports.
If you want to query the server you can query any address whatsoever.. just pick one at random. So basic script logic should say if ip is 0.0.0.0, query the primary ip and you're good to go. Hell you can even query the loopback and avoid checking for ips altogether. Just query 127.0.0.1.
As far as I know about socket programming as a software engineer, there are almost 0 programs out there that absolutely require binding to a single ip. Most of the software out there (mostly desktop-oriented) does not even support binding to a single ip (no configuration option for it) making it troublesome to route only through VPNs for security, for example.
If you want to bind you can. The issue here is that non-binding is not supported by the scripts.
This can be solved by a status message on run saying something like: "Listening on any address" vs "Listening on x.x.x.x". The information you want right on spot :)
@Nodens- I'm not new to Linux, it's even my job to administrate Linux server.
is of course referring overlapping ports. Most users are noobs and don't even know that they can change ports. Also, what's the point of having multiple IPs if all of your services listen to all of them? I don't know how YOU do DDoS mitigation, but i've never seen anybody doing what you're saying.
Valid point, we can change that for sure to query on localhost if it listens on 0.0.0.0.
Well, it's been a while since I didn't face issues because of that, since I always bind my game servers to specific IPs, but I'm sure I resolved many issues by doing so. However, some re-testing would be required to validate or invalidate my point.
I'd rather have some option like allownobinding="on/off" and remove any warning if it is "on".
Another use case for using ip 0.0.0.0 is when you're trying to run LGSM inside a docker container in docker swarm.
In that case the container will have multiple IP's, Traffic can get into the container on any of those interfaces (depending on how the swarm is accessed) and binding to a single one means that some methods of hitting the swarm don't work.
I've been trying to build a little docker container around LGSM for a little while now, this 0.0.0.0 ip binding limitation is the part I'm having most trouble work around.
Sorry, I somehow missed your reply @UltimateByte
Of course I never implied that you are new to Linux or anything of the sort. I was just replying to your points :)
Regarding DDOS mitigation it is a common trick to null route targeted ips and use secondary/tertiary/etc to keep services online. On low budget it's the only thing you can do and it's effective unless the botnet attacking you cat detect new ip and redirect the attack. Of course, if you have bigger budget you get behind proper DDOS mitigation but for low budget networks the null route+failover ips is the only option as far as I know.
allownobinding switch sounds good. Basically any implementation that would allow INADDR_ANY sounds good :)
I probably said that because I found that you were trying to teach me too basic stuff, whatever, I was in an arrogant piece of shit mood, I apologize for this. :o))
Interesting way of mitigating, however if it's a bandwidth flood and your bandwidth is saturated, it will still be saturated even if you drop packets, also, I still don't think most game server admins know about it, and in many cases, an IP change would break the system, for example in the case of a basic Apache server running in Plesk, where the vhost is bound to a specific IP or for game servers, people would need to know the secondary IP, which would basically make you lose most of your players since you usually distribute one IP for a game server.
We've been talking with Daniel about greatly reworking LinuxGSM, which would most likely change the way config files, IP and ports are handled. That might be the moment when we solve this issue.
Activity
dgibbs64 commentedon Dec 19, 2017
Thanks for the feedback. I belive the WARN message should be changed to a FAIL instead. As it is a critical error.
The check IP feature is designed to ensure that an IP is correctly set to allow servers to be queried using gsquery, display correct IP details and to bind to the correct IP. Not specifying a specific IP causes issues with LinuxGSM itself and for some game servers it can give odd results, because of this not specifying an IP will prevent the server from starting.
If you are using a LAN IP for example
192.168.1.5then the IP should be set to that address.I don't understand what you mean by when you say that setting an IP other than
0.0.0.0will prevent LAN broadcast as your LAN IP should be set.it also should be possible to remove the -ip setting from parms all together if it is causing an issue.
Hope this helps
991jo commentedon Dec 20, 2017
Hi
I just realized, that the script say [ FAIL ], the wiki article is not up to date.
Regarding the broadcast:
I am using Fistful of Frags, but this should work with any other srcds game.
When using -ip with the correct IP address, then all sockets of the server bind to that IP:
when you open up tcpdump or wireshark you can see the clients query packets via broadcast but no responses from the server (client and server running on the same host, no firewalls in place that could block packets)
now with -ip 0.0.0.0:
Only with the second case with the 0.0.0.0 IP bind the server answers the query packets that are send via broadcast.
This means that either srcds is broken since possibly ever or this is intended by srcds which means there is a valid reason to bind to 0.0.0.0.
Nodens- commentedon Jan 18, 2018
0.0.0.0 means listening on everything. This should be allowed and is actually needed for many things.
How LinuxGSM should handle it is simple. Allow the use of 0.0.0.0 and simply choose one of the ips (eg the first) for LinuxGSM use as a process listening on all, will listen and respond to any ip unless blocked by a firewall (which is another matter entirely and fall under misconfiguration of firewall).
UltimateByte commentedon Jan 18, 2018
I vote for keeping the current way.
dgibbs64 commentedon Jan 18, 2018
@Nodens- what sort of things? I see no reason as to why you need a game server to listen on more than one interface. Unless I am missing somthing.
991jo commentedon Jan 18, 2018
You cannot properly use srcds in a LAN without binding to 0.0.0.0 as demonstrated above.
Then just make it a warning at startup and continue running the server.
dgibbs64 commentedon Jan 18, 2018
@991jo the LAN issue does need to be investigated further. However this is an issue with srcds only as far as I am aware. So an exception may have to be made for srcds in LAN mode. This currently would mean that gsquery would not be able to work as it needs an IP to query. A change in the proccess will have to be made but I am not sure the best way to go about this. It will require some thought
991jo commentedon Jan 18, 2018
Since the scripts can somehow detect the IP addresses gsquery can just take one of them if it binds to all. possibly even 127.0.0.1.
Nodens- commentedon Jan 19, 2018
@dgibbs64: Here's a big one, servers with failover addresses and DDOS mitigation. If you are forced to bind to a single address you can't utilize that. All my servers utilize this. A common setup for example is detecting a DDOS and nullroute the ip getting attacked. Server still functions properly on the failover.
I just used LinuxGSM today for the first time while setting up a Project Zomboid server and I've hit two issues, the one I posted (python dependency not detected--which is minor since it does not prevent script execution) and this one that I would post myself if it was not already here heh. The server I was setting it up on has currently 6 ipv4 addresses and 6 ipv6.
@UltimateByte: Regarding your points:
Nothing can conflict by using 0.0.0.0. 0.0.0.0 is just INADDR_ANY in code if you want to look it up. All it does is listening at any ip address vs binding to a single ip only. You can have N software listening at any address with no problem whatsoever. In fact this is the default in both linux and windows unless specifically set otherwise. The only problem is when you want to use the same port on 2 different pieces of software. At that point though you know what you're doing (you're doing this on purpose) so you can either bind each to a different ip or use different ports.
If you want to query the server you can query any address whatsoever.. just pick one at random. So basic script logic should say if ip is 0.0.0.0, query the primary ip and you're good to go. Hell you can even query the loopback and avoid checking for ips altogether. Just query 127.0.0.1.
As far as I know about socket programming as a software engineer, there are almost 0 programs out there that absolutely require binding to a single ip. Most of the software out there (mostly desktop-oriented) does not even support binding to a single ip (no configuration option for it) making it troublesome to route only through VPNs for security, for example.
If you want to bind you can. The issue here is that non-binding is not supported by the scripts.
This can be solved by a status message on run saying something like: "Listening on any address" vs "Listening on x.x.x.x". The information you want right on spot :)
UltimateByte commentedon Jan 19, 2018
@Nodens- I'm not new to Linux, it's even my job to administrate Linux server.
allownobinding="on/off"and remove any warning if it is "on".joshhsoj1902 commentedon Mar 5, 2018
Another use case for using ip
0.0.0.0is when you're trying to run LGSM inside a docker container in docker swarm.In that case the container will have multiple IP's, Traffic can get into the container on any of those interfaces (depending on how the swarm is accessed) and binding to a single one means that some methods of hitting the swarm don't work.
I've been trying to build a little docker container around LGSM for a little while now, this 0.0.0.0 ip binding limitation is the part I'm having most trouble work around.
Nodens- commentedon Mar 5, 2018
Sorry, I somehow missed your reply @UltimateByte
Of course I never implied that you are new to Linux or anything of the sort. I was just replying to your points :)
Regarding DDOS mitigation it is a common trick to null route targeted ips and use secondary/tertiary/etc to keep services online. On low budget it's the only thing you can do and it's effective unless the botnet attacking you cat detect new ip and redirect the attack. Of course, if you have bigger budget you get behind proper DDOS mitigation but for low budget networks the null route+failover ips is the only option as far as I know.
allownobinding switch sounds good. Basically any implementation that would allow INADDR_ANY sounds good :)
UltimateByte commentedon Mar 6, 2018
I probably said that because I found that you were trying to teach me too basic stuff, whatever, I was in an arrogant piece of shit mood, I apologize for this. :o))
Interesting way of mitigating, however if it's a bandwidth flood and your bandwidth is saturated, it will still be saturated even if you drop packets, also, I still don't think most game server admins know about it, and in many cases, an IP change would break the system, for example in the case of a basic Apache server running in Plesk, where the vhost is bound to a specific IP or for game servers, people would need to know the secondary IP, which would basically make you lose most of your players since you usually distribute one IP for a game server.
We've been talking with Daniel about greatly reworking LinuxGSM, which would most likely change the way config files, IP and ports are handled. That might be the moment when we solve this issue.
20 remaining items
h3o66 commentedon Sep 13, 2020
Connected to #3015
github-actions commentedon Sep 21, 2021
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.