OpenFactorioServerManager / factorio-server-manager

A tool to help manage Factorio multiplayer servers including mods and save games.
MIT License
541 stars 129 forks source link

Docker: Traefik usage and player bans. #351

Open danbka33 opened 1 year ago

danbka33 commented 1 year ago

When accessing the factorio server through traefik, all users connect through the internal network created by traefik with the same IP address, for example 172.18.0.2. If you ban a player who is currently on the server, his IP will be banned along with the player himself. In total, we get that all users are banned and cannot log in.

Solution:

  1. Use nginx/caddy for fsm web admin.
  2. Remove server port forwarding (34197) from traefik container, create port forwarding from container with fsm.
knoxfighter commented 8 months ago

I am confused, factorio uses IP bans by default? I wasn't able to find anything about that on the factorio site or in the forums.

Mattie112 commented 8 months ago

Can you not use ProxyProtocol (or something similar) to let traefik use the IP of the user instead of the actual IP? Not sure if that is supported but perhaps worth looking into.

(other 'solution' directly use port mapping to your factorio, not through traefik)

But I must ask: if it is Factorio that handles the banning (and not this web UI) then should you not ask your question there?

danbka33 commented 7 months ago

Can you not use ProxyProtocol (or something similar) to let traefik use the IP of the user instead of the actual IP? Not sure if that is supported but perhaps worth looking into.

As far as I know this is not supported.

But I must ask: if it is Factorio that handles the banning (and not this web UI) then should you not ask your question there?

This is an error in the example of docker compose configuration that you provide, that leads to the ban of a player on the local IP.

danbka33 commented 7 months ago

I am confused, factorio uses IP bans by default? I wasn't able to find anything about that on the factorio site or in the forums.

This also came as a shock to me, after I banned one player, but then I myself could not get into the server.