I will be looking into network namespaces with Docker containers. This workaround was explained in this thread regarding the current Rust networking issue. Keep in mind, this reply was made with the assumption we weren't using Docker containers. Docker handles its own networking in containers. Therefore, this will be a bit more tricky and complicated with Docker containers in my opinion.
I will be trying to either change the default route in the Rust server container to the internal IP we have sourced out as the Rust external IP or using the "network namespaces" guide.
Workarounds I've Tried But Don't Suit Our Needs
Source Internal Machine IP (using Master Server Ports) Out As External Rust Address
Although I dislike this workaround, it was worth a try. I tried sourcing all traffic going out from the machine internal IP on Valve Master Server ports as the external Rust address. This worked for a week until it suddenly stopped because the port it is sending out as isn't in the range of ports I made for the firewall. Unfortunately, I don't know all of Valve's Master Server ports because it isn't documented anywhere from what I've seen. If I can find a list ports, I will be able to make this workaround active again. When this workaround is working, the only downfall is we will only be able to host Rust servers on one external IP per machine. So if we looked into running two Rust servers on the same machine, they will have the same external address with different ports (e.g. 28015 and 28016).
My current firewall uses port ranges 20000 - 30000 UDP/TCP. Unfortunately, the game server reports to the Valve Master Server on ports outside of that range. Hence why the workaround isn't working at the moment.
I may try getting the ports it is currently sourcing out with using tcpdump. However, this will be complicated and I'd highly prefer if Valve would just list the ports.
Translating The Machine's External IP To Rust's External IP
I have also tried making a firewall rule that translated the machine's external IP (what Valve Master Server is reporting) to the Rust external IP. This works and basically makes it so if you try requesting the machine's external IP, it will be translated to Rust's external IP. The problem with this is we will likely only be able to run one Rust server on each machine and the server will look like it has two IPs (the fake IP used in the server browser listing and the real Rust IP). I personally dislike this workaround the most because it is inconsistent and sloppy. But it was still worth a try.
This is a project moved from our old Technical Tasks database to the Projects database. Some sensitive information may have been cut out when moving to the public.
Edited by Roy