NginxProxyManager / NginxProxyManager/nginx-proxy-manager

Real IP addresses in the log?

Open
#3,267 28 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
34.2k
Forks
3.9k
Avg merge
21h 12m
Merged PRs (30d)
20

Description

Good day to everyone, looking for help, tips

In short, there is such a scheme of the home network
image
There is nothing between the router and NPM, just a direct port forwarding to the container with the NPM (192.168.0.200 80, 443).

Used docker-compose -

version: '3.8'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    container_name: nginx-proxy-manager
    ports:
      - '80:80'
      - '443:443'
      - '4488:81'
    environment:
      DB_HOST: "db"
      DB_PORT: 5432
      DB_USER: $(DB_USER)
      DB_PASSWORD: $(DB_PASSWORD)
      DB_NAME: $(DB_NAME)
      DISABLE_IPV6: 'true'
      X_FRAME_OPTIONS: "sameorigin"
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - db
    healthcheck:
      test: ["CMD", "/bin/check-health"]
      interval: 10s
      timeout: 3s
    networks:
      dockernet:
        ipv4_address: 172.16.0.2
  db:
    image: 'postgres:13'
    restart: unless-stopped
    container_name: nginx-proxy-manager-db
    environment:
      POSTGRES_USER: $(POSTGRES_USER)
      POSTGRES_PASSWORD: $(POSTGRES_PASSWORD)
      POSTGRES_DB: $(DB_NAME)
    volumes:
      - pg-data:/var/lib/postgresql/data
    networks:
      dockernet:
        ipv4_address: 172.16.0.3
volumes:
  pg-data:
networks:
  dockernet:
    external: true

A network has been created
docker network create --subnet=172.16.0.0/24 dockernet

Hosts have been added to NPM, everything works fine, full Internet access to all resources

To view logs, I use goaccess (xavierh/goaccess-for-nginxproxymanager). But the whole problem is that only one client address appears everywhere in the log - 172.16.0.1 (takes information (parses) for display directly from the npm logs folder).
image

Is it possible on this configuration to ensure that the logs display the real addresses of connecting clients?
All the options found on the Internet and suggested by chatgpt :) did not help me. It’s possible, of course, to configure the router settings, but I didn’t find anything suitable in the standard firmware...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file, test, or entry point is named. Start by reproducing the Docker network setup and inspecting the Nginx access-log configuration; done means documenting or implementing a supported configuration that records connecting clients' real IP addresses instead of 172.16.0.1.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, nginx
Domain
devops, networking, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.