Skip to content

Cannot get game servers to bind to loopback interface #696

@finalglyph

Description

@finalglyph

According to your documentation, there are 3 ways to configure how the server's "own" IP address is determined:

  1. the "-resolveIP" parameter
  2. the RESOLVE_IP env var
  3. the ASPNETCORE_ENVIRONMENT env var

Unfortunately, none of them seem to have any effect, at least when using the "munique/openmu:0.9.8" Docker Hub image.

With the following docker-compose.yml, the game servers are still binding to my public IP:

services:
  nginx-80:
    image: nginx:alpine
    container_name: nginx-80
    ports:
      - "80:80"
    volumes:
      - ./nginx/nginx.dev.conf:/etc/nginx/nginx.conf:ro
      - ./.htpasswd:/etc/nginx/.htpasswd
    depends_on:
      - openmu-startup

  openmu-startup:
    image: munique/openmu
    container_name: openmu-startup
    ports:
      - "8080"
      - "55901:55901"
      - "55902:55902"
      - "55903:55903"
      - "55904:55904"
      - "55905:55905"
      - "55906:55906"
      - "44405:44405"
      - "44406:44406"
      - "55980:55980"
    environment:
      DB_HOST: database
      ASPNETCORE_URLS: http://+:8080
      ASPNETCORE_ENVIRONMENT: Development
      RESOLVE_IP: loopback
    working_dir: /app/
    volumes:
      - ./.htpasswd:/etc/nginx/.htpasswd
    depends_on:
      - database
    command: -resolveIP:loopback

  database:
    image: postgres
    container_name: database
    environment:
      POSTGRES_PASSWORD: admin
      POSTGRES_DB: openmu
      POSTGRES_USER: postgres
    ports:
      - "5432"
    volumes:
      - dbdata:/var/lib/postgresql #store data on volume

volumes:
  dbdata:

It's your "all-in-one" docker-compose.yml with all 3 options mentioned above added to the "openmu-startup" service.

Please let me know if there is something else I can do to configure the dockerized OpenMU to use my loopback interface as "own" address instead of my public IP.

Otherwise, please investigate why (the dockerized) OpenMU doesn't honor any of those 3 settings.

This may be related to issue #127.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions