Skip to content

/api/global/status returns 404 #3

Description

@alexandreMesle

Describe the bug

The fail2rest service always respond 404.

To Reproduce

Using this docker-compose file given below, the fail2rest service will always respond 404.

Especially, the ajax call from the https://fail2web.XXXXXX/ to https://fail2rest.XXXXXX/api/global/status responds 404.

What I aldready tried

  • Using the host's fail2ban instead of the crazymax/fail2ban container
  • Using dedicated ports instead of traefik
  • Removing the https redirections
  • Looking for the requirements, I was surprised to see that nobody talks about the versions of fail2ban that are compatiblles with fail2rest

Moreover, I don't really understand where the fail2rest sessions are secured... Shouldn't the environment variables containing the credentials be shared across the fail2web and fail2rest containers ?

Expected behavior

I suppose the ajax call is supposed to return 200 ?

Docker (please complete the following information):

  • Docker version 20.10.8, build 3967b7d
  • docker-compose version 1.24.0, build 0aa59064

Desktop (please complete the following information):

  • Ubuntu 18.04

Smartphone (please complete the following information):
Same behavior on all devices.

Additional context
Here is the docker-compose file :

version: "3.5"

services:
  fail2ban:
    image: crazymax/fail2ban:latest
    container_name: f2b_fail2ban
    environment:
      SSMTP_HOST: XXXXXXXXXXXX
      SSMTP_PORT: XXXXXXXXXXXX
      SSMTP_HOSTNAME: XXXXXXXXXXX
      SSMTP_USER: XXXXXXXXXXXXX
      SSMTP_PASSWORD: XXXXXXXXXXXX
      SSMTP_TLS: XXXXXXXXXXXXX
    cap_add:
      - NET_ADMIN
      - NET_RAW
    volumes:
      - ./proc/fail2ban/:/var/run/fail2ban/
      - XXXXXXXXXXXXXXXXXXXXXXXXXX
    restart: always

  fail2web:
    image: monogramm/docker-fail2web
    container_name: f2b_fail2web
    restart: always
    networks:
      - traefik_network
    environment:
      - FAIL2REST_ADDR=http://fail2rest.XXXX
      - FAIL2REST_USER=XXXX
      - FAIL2REST_PASSWD=XXXXXX
    volumes:
      - ./proc/fail2web/:/srv/fail2web/
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    labels:
      - "traefik.enable=true"
      - "traefik.frontend.rule=Host:fail2web.XXXXXX"
      - "traefik.port=80"
      - "traefik.backend=fail2web"
      - "traefik.frontend.redirect.entryPoint=https"
      - "traefik.frontend.entryPoints=http,https"

  fail2rest:
    image: monogramm/docker-fail2rest
    container_name: f2b_fail2rest
    restart: always
    networks:
      - traefik_network
    volumes:
      - ./proc/fail2rest/:/srv/fail2rest/
      - ./proc/fail2ban/:/var/run/fail2ban/
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    labels:
      - "traefik.enable=false"
      - "traefik.frontend.rule=Host:fail2rest.XXXXXXXXXXXX"
      - "traefik.port=5000"
      - "traefik.backend=fail2rest"
      - "traefik.frontend.redirect.entryPoint=https"
      - "traefik.frontend.entryPoints=http,https"

networks:
  traefik_network:
    external: true

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions