Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Docker MacVLAN with fixed IP not resolving after login and not reverse proxy'ing the BunkerWeb UI #1872

Open
2 tasks done
Divaaaaaan opened this issue Jan 9, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@Divaaaaaan
Copy link

What happened?

I'm trying to get my BW instance to have a fixed IP inside a VLAN that I've created on my Unifi router. When deployed I'm able to access the login via the fixed IP I specify but after logging in, it redirects me to a "redirecting" page. See below. I'm also with the config unable to resolve the reverse proxy dns name for the UI. Not sure if this is just a config issue on my side. When I remove the macvlan network and use the docker host everything works as expected hence I think it might be a config issue but not 100% sure.
image

How to reproduce?

  • Create macvlan config
  • Create macvlan network
  • Add to config file
  • Deploy

Configuration file(s) (yaml or .env)

x-ui-env: &bnkr-wb-user-interface-env
  AUTOCONF_MODE: "yes"
  DATABASE_URI: "mariadb+pymysql://bnkr-wb:Mariadb01!@bnkr-wb-database:3306/bnkr-wb"

services:
  bnkr-wb:
    container_name: bnkr-wb
    image: bunkerity/bunkerweb:1.6.0-beta
    labels:
      - "bunkerweb.INSTANCE=yes"
    ports:
      - "80:8080/tcp"
      - "443:8443/tcp"
      - "443:8443/udp"
    environment:
      AUTOCONF_MODE: "yes"
      API_WHITELIST_IP: "127.0.0.0/8 172.0.0.0/8 10.0.0.0/8"
      SEND_ANONYMOUS_REPORT: "no"
      SESSIONS_IDLING_TIMEOUT: 28800
      SESSIONS_ROLLING_TIMEOUT: 57600
      SESSIONS_CHECK_IP: "no"
      SESSIONS_CHECK_USER_AGENT: "no"
    restart: always
    networks:
      bnkr-wb-universe:
      bnkr-wb-services:

  bnkr-wb-scheduler:
    container_name: bnkr-wb-scheduler
    image: bunkerity/bunkerweb-scheduler:1.6.0-beta
    environment:
      <<: *bnkr-wb-user-interface-env
      BUNKERWEB_INSTANCES: ""
      SERVER_NAME: ""
      API_WHITELIST_IP: "127.0.0.0/8 172.0.0.0/8 10.0.0.0/8"
      MULTISITE: "yes"
      USE_REAL_IP: "yes"
      REAL_IP_HEADER: "CF-Connecting-IP"
      REAL_IP_RECURSIVE: "yes"
      REAL_IP_FROM_URLS: "https://www.cloudflare.com/ips-v4/ https://www.cloudflare.com/ips-v6/"
      REAL_IP_FROM: "127.0.0.0/8 172.0.0.0/8 10.0.0.0/8"
    volumes:
      - /mnt/data/applications/bnkr-wb/data:/data
    restart: always
    networks:
      bnkr-wb-universe:
      bnkr-wb-database:

  bnkr-wb-auto-configuration:
    container_name: bnkr-wb-auto-configuration
    image: bunkerity/bunkerweb-autoconf:1.6.0-beta
    depends_on:
      - bnkr-wb-docker
    environment:
      <<: *bnkr-wb-user-interface-env
      DOCKER_HOST: "tcp://bnkr-wb-docker:2375"
    restart: always
    networks:
      bnkr-wb-universe:
      bnkr-wb-docker:
      bnkr-wb-database:

  bnkr-wb-docker:
    container_name: bnkr-wb-docker
    image: tecnativa/docker-socket-proxy:nightly
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      CONTAINERS: "1"
      LOG_LEVEL: "warning"
    networks:
      bnkr-wb-docker:

  bnkr-wb-user-interface:
    container_name: bnkr-wb-user-interface
    image: bunkerity/bunkerweb-ui:1.6.0-beta
    environment:
      <<: *bnkr-wb-user-interface-env
      TOTP_SECRETS: "1234"
      ADMIN_USERNAME: "admin"
      ADMIN_PASSWORD: "admin"
    restart: always
    labels:
      - "bunkerweb.USE_UI=yes"
      - "bunkerweb.SERVER_NAME=bnkr-wb.example.com"
      - "bunkerweb.USE_REVERSE_PROXY=yes"
      - "bunkerweb.REVERSE_PROXY_URL=/"
      - "bunkerweb.REVERSE_PROXY_HOST=http://bnkr-wb-user-interface:7000"
    networks:
      vlan-security:
        ipv4_address: 10.69.2.43
      bnkr-wb-universe:
      bnkr-wb-database:

  bnkr-wb-database:
    container_name: bnkr-wb-database
    image: mariadb:11
    environment:
      MYSQL_RANDOM_ROOT_PASSWORD: "yes"
      MYSQL_DATABASE: "bnkr-wb"
      MYSQL_USER: "bnkr-wb"
      MYSQL_PASSWORD: "Mariadb01!"
    volumes:
      - /mnt/data/applications/bnkr-wb/mysql:/var/lib/mysql
    restart: always
    networks:
      bnkr-wb-database:

networks:
  vlan-security:
    external: true
  bnkr-wb-universe:
    name: bnkr-wb-universe
    ipam:
      driver: default
      config:
        - subnet: 10.11.12.0/24
  bnkr-wb-services:
    name: bnkr-wb-services
  bnkr-wb-docker:
    name: bnkr-wb-docker
  bnkr-wb-database:
    name: bnkr-wb-database

Relevant log output

No specific log output that I'm seeing that indicates any sort of error/issue

BunkerWeb version

1.6.0-beta

What integration are you using?

Docker

Linux distribution (if applicable)

TrueNAS Scale

Removed private data

  • I have removed all private data from the configuration file and the logs

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Divaaaaaan Divaaaaaan added the bug Something isn't working label Jan 9, 2025
@TheophileDiot
Copy link
Member

Hi @Divaaaaaan, thank you for opening this issue. This might be due to the cookie flags.
Can you try setting the COOKIE_FLAGS setting to this value: * SameSite=Lax ?

@Divaaaaaan
Copy link
Author

Divaaaaaan commented Jan 9, 2025

Hi @TheophileDiot, cool will do that quickly and check. I assume as an environment variable under the scheduler correct?
Seeing this in the console:
image

@Divaaaaaan
Copy link
Author

Still no luck and have been battling most of the day trying to get it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants