tiny-csgo-server icon indicating copy to clipboard operation
tiny-csgo-server copied to clipboard

Support public_ip

Open R1KO opened this issue 3 years ago • 8 comments

Add argument for specify server public ip. Original srcds args: -ip, +net_public_addr

Because when i'm running server in docker container server starts on local container ip and can't receive connects.

R1KO avatar Apr 14 '23 12:04 R1KO

You can achieve this by creating iptables rules

saguaro-yerba avatar Apr 14 '23 12:04 saguaro-yerba

Can you elaborate? I do not understand how iptables will help with this

R1KO avatar Apr 14 '23 16:04 R1KO

Haven't tested in docker, I'll take a look at this when I have time.

yourmnbbn avatar Apr 20 '23 07:04 yourmnbbn

Can you elaborate? I do not understand how iptables will help with this

If the container has an internet connection and you just need to forward the udp port. I also run this on Docker on my local network and all I need is UDP port forwarding: docker run -p 27015:27015/udp [...] Your server should be visible from Steam Masterserver API: http://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=<SERVER PUBLIC IP HERE>&format=json

saguaro-yerba avatar Apr 20 '23 10:04 saguaro-yerba

Can you elaborate? I do not understand how iptables will help with this

If the container has an internet connection and you just need to forward the udp port. I also run this on Docker on my local network and all I need is UDP port forwarding: docker run -p 27015:27015/udp [...] Your server should be visible from Steam Masterserver API: http://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=&format=json

It works! But it require specify different ports for each container because add to master server with port specified in port option =(

R1KO avatar Apr 26 '23 10:04 R1KO

Can you elaborate? I do not understand how iptables will help with this

If the container has an internet connection and you just need to forward the udp port. I also run this on Docker on my local network and all I need is UDP port forwarding: docker run -p 27015:27015/udp [...] Your server should be visible from Steam Masterserver API: http://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=&format=json

It works! But it require specify different ports for each container because add to master server with port specified in port option =(

I'm not sure if I understand correctly, but you can try using host network --network host, then you don't need to do redirect UDP ports on containers

saguaro-yerba avatar Apr 27 '23 10:04 saguaro-yerba

I'm not sure if I understand correctly, but you can try using host network --network host, then you don't need to do redirect UDP ports on containers

i know) I have done so now, but I'm afraid of possible problems associated with it.

Thanks for response)

R1KO avatar Apr 27 '23 10:04 R1KO

I'm not sure if I understand correctly, but you can try using host network --network host, then you don't need to do redirect UDP ports on containers

i know) I have done so now, but I'm afraid of possible problems associated with it.

Thanks for response)

Yeah that's true, it can cause some problems, port forwarding on Docker worked better for me 😀

saguaro-yerba avatar Apr 27 '23 10:04 saguaro-yerba