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

Adguard log error [info] auth: invalid Basic Authorization value #6357

Closed
4 tasks done
lordraiden opened this issue Oct 26, 2023 · 3 comments
Closed
4 tasks done

Adguard log error [info] auth: invalid Basic Authorization value #6357

lordraiden opened this issue Oct 26, 2023 · 3 comments

Comments

@lordraiden
Copy link

Prerequisites

Platform (OS and CPU architecture)

Linux, AMD64 (aka x86_64)

Installation

Docker

Setup

On one machine

AdGuard Home version

Version: v0.107.40

Action

x-default: &config
  restart: unless-stopped
  cpuset: 12,13,14,15
  security_opt:
    - no-new-privileges:true
#dns: 10.10.50.5
  labels:
    - "wud.watch=true"

# Services ####################################################

services:

# Adguard Home 5 Internal ######################################

  adguardhomeint5:
    container_name: AdGuardHomeINT5
    image: adguard/adguardhome
    <<: *config
    networks:
      eth1:
        ipv4_address: 10.10.40.5
    ports:
      - "53:53/tcp" # Plain DNS
      - "53:53/udp" # Plain DNS
    # - "67:67/udp" # DHCP
    # - "68:68/tcp" # DHCP
    # - "68:68/udp" # DHCP
      - "80:80/tcp" # HTTPS/DNS-over-HTTPS server & admin panel
      - "443:443/tcp" # HTTPS/DNS-over-HTTPS server & admin panel
      - "443:443/udp" # HTTPS/DNS-over-HTTPS server & admin panel
      - "3000:3000/tcp" # admin panel
    # - "853:853/tcp" # DNS-over-TLS server
    # - "5443:5443/tcp" # DNSCrypt server 
    # - "5443:5443/udp" # DNSCrypt server
    volumes:
      - /mnt/services/docker/AdguardINT5/config:/opt/adguardhome/conf
      - /mnt/services/docker/AdguardINT5/workingdir:/opt/adguardhome/work

Expected result

Shouldn't get errors in the logs

Actual result

2023/10/26 17:31:21.105993 [info] AdGuard Home, version v0.107.40
2023/10/26 17:31:21.110687 [info] tls: using default ciphers
2023/10/26 17:31:21.111453 [info] safesearch default: disabled
2023/10/26 17:31:21.120349 [info] Initializing auth module: /opt/adguardhome/work/data/sessions.db
2023/10/26 17:31:21.120456 [info] auth: initialized. users:1 sessions:1
2023/10/26 17:31:21.120482 [info] AdGuard Home updates are disabled
2023/10/26 17:31:21.120496 [info] web: initializing
2023/10/26 17:31:21.242427 [info] dnsproxy: cache: enabled, size 4096 b
2023/10/26 17:31:21.242461 [info] dnsproxy: max goroutines is set to 50
2023/10/26 17:31:21.242575 [info] AdGuard Home is available at the following addresses:
2023/10/26 17:31:21.242595 [info] go to http://10.10.40.5:80
2023/10/26 17:31:21.242624 [info] clients: processing addresses
2023/10/26 17:31:22.312598 [info] auth: invalid Basic Authorization value
2023/10/26 17:31:22.367718 [info] auth: invalid Basic Authorization value
2023/10/26 17:31:22.425836 [info] auth: invalid Basic Authorization value
2023/10/26 17:31:22.484493 [info] auth: invalid Basic Authorization value
2023/10/26 17:31:22.550269 [info] auth: invalid Basic Authorization value
2023/10/26 17:31:24.268098 [info] dnsproxy: starting dns proxy server
2023/10/26 17:31:24.268118 [info] Ratelimit is enabled and set to 20 rps
2023/10/26 17:31:24.268121 [info] The server is configured to refuse ANY requests
2023/10/26 17:31:24.268123 [info] dnsproxy: cache: enabled, size 8388608 b
2023/10/26 17:31:24.268128 [info] dnsproxy: max goroutines is set to 50
2023/10/26 17:31:24.268138 [info] dnsproxy: creating udp server socket 10.10.40.5:53
2023/10/26 17:31:24.268212 [info] dnsproxy: listening to udp://10.10.40.5:53
2023/10/26 17:31:24.268218 [info] dnsproxy: creating tcp server socket 10.10.40.5:53
2023/10/26 17:31:24.268245 [info] dnsproxy: listening to tcp://10.10.40.5:53
2023/10/26 17:31:24.268324 [info] dnsproxy: entering udp listener loop on 10.10.40.5:53
2023/10/26 17:31:24.268345 [info] dnsproxy: entering tcp listener loop on 10.10.40.5:53
2023/10/26 17:31:29.238197 [info] auth: invalid Basic Authorization value
2023/10/26 17:31:29.290646 [info] auth: invalid Basic Authorization value
2023/10/26 17:31:29.343979 [info] auth: invalid Basic Authorization value
2023/10/26 17:31:29.395334 [info] auth: invalid Basic Authorization value
2023/10/26 17:31:29.446601 [info] auth: invalid Basic Authorization value
2023/10/26 17:31:39.240820 [info] auth: invalid Basic Authorization value
2023/10/26 17:31:39.293832 [info] auth: invalid Basic Authorization value

Additional information and/or screenshots

I have a similar instance, the compose is exactly the same and I don't get those errors in the logs.

@ainar-g
Copy link
Contributor

ainar-g commented Oct 27, 2023

The message itself most likely means that someone is trying to hack into your AGH. These auth messages should also show the remote address so that it's easier for admins to ban them, but for some reason this one doesn't.

@schzhn, please make sure that all logging in the auth unit includes the remote address. There is already the writeErrorWithIP helper, but it's clearly not enough.

@ainar-g ainar-g added this to the v0.107.41 milestone Oct 27, 2023
adguard pushed a commit that referenced this issue Nov 3, 2023
Updates #6357.

Squashed commit of the following:

commit 0d37544
Merge: 61858bd 52713a2
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Nov 3 14:47:10 2023 +0300

    Merge branch 'master' into 6357-auth-log-remote-ip

commit 61858bd
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Nov 3 14:44:58 2023 +0300

    all: upd chlog

commit 1eef672
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Nov 2 19:20:41 2023 +0300

    home: imp code

commit 2956aed
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Nov 2 16:10:07 2023 +0300

    home: imp docs

commit ca0f53d
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Oct 31 15:08:37 2023 +0300

    home: imp code

commit 6b11b46
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Oct 27 19:45:55 2023 +0300

    home: auth log remote ip
@schzhn
Copy link
Member

schzhn commented Nov 7, 2023

We've pushed the edge release containing the improved logging.

@schzhn
Copy link
Member

schzhn commented Nov 7, 2023

@lordraiden, now the auth log messages should contain the remote address.

@schzhn schzhn closed this as completed Nov 10, 2023
@ainar-g ainar-g modified the milestones: v0.107.42, v0.107.41 Nov 13, 2023
annguyen0 pushed a commit to annguyen0/AdGuardHome that referenced this issue Nov 27, 2023
Updates AdguardTeam#6357.

Squashed commit of the following:

commit 0d37544
Merge: 61858bd 52713a2
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Nov 3 14:47:10 2023 +0300

    Merge branch 'master' into 6357-auth-log-remote-ip

commit 61858bd
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Nov 3 14:44:58 2023 +0300

    all: upd chlog

commit 1eef672
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Nov 2 19:20:41 2023 +0300

    home: imp code

commit 2956aed
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Nov 2 16:10:07 2023 +0300

    home: imp docs

commit ca0f53d
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Oct 31 15:08:37 2023 +0300

    home: imp code

commit 6b11b46
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Oct 27 19:45:55 2023 +0300

    home: auth log remote ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@ainar-g @lordraiden @schzhn and others