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

Can't access Pi-Hole web UI #69

Open
Melistraza opened this issue Feb 9, 2022 · 7 comments
Open

Can't access Pi-Hole web UI #69

Melistraza opened this issue Feb 9, 2022 · 7 comments

Comments

@Melistraza
Copy link

Melistraza commented Feb 9, 2022

Web UI of Pi-Hole not available!

I even added ports

    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "80:80/tcp"

My docker-compose.yml file

version: "3"

networks:
  private_network:
    ipam:
      driver: default
      config:
        - subnet: 10.2.0.0/24

services:
  unbound:
    image: "mvance/unbound:latest"
    container_name: unbound
    restart: unless-stopped
    hostname: "unbound"
    volumes:
      - "./unbound:/opt/unbound/etc/unbound/"
    networks:
      private_network:
        ipv4_address: 10.2.0.200

  wireguard:
    depends_on: [unbound, pihole]
    image: linuxserver/wireguard
    container_name: wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Kiev # Change to your timezone
      - SERVERPORT=51820
      #- SERVERURL=my.ddns.net #optional - For use with DDNS (Uncomment to use)
      - PEERS=2 # How many peers to generate for you (clients)
      - PEERDNS=10.2.0.100 # Set it to point to pihole
      - INTERNAL_SUBNET=10.6.0.0
      
    volumes:
      - ./wireguard:/config
      - /lib/modules:/lib/modules
    ports:
      - "51820:51820/udp"
    dns:
      - 10.2.0.100 # Points to pihole
      - 10.2.0.200 # Points to unbound
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1

    restart: unless-stopped
    networks:
      private_network:
        ipv4_address: 10.2.0.3

  pihole:
    depends_on: [unbound]
    container_name: pihole
    image: pihole/pihole:latest
    restart: unless-stopped
    hostname: pihole
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "80:80/tcp"
    dns:
      - 127.0.0.1
      - 10.2.0.200 # Points to unbound
    environment:
      TZ: "Europe/Kiev"
      WEBPASSWORD: "" # Blank password - Can be whatever you want.
      ServerIP: 10.1.0.100 # Internal IP of pihole
      DNS1: 10.2.0.200 # Unbound IP
      DNS2: 10.2.0.200 # If we don't specify two, it will auto pick google.
    # Volumes store your data between container upgrades
    volumes:
      - "./etc-pihole/:/etc/pihole/"
      - "./etc-dnsmasq.d/:/etc/dnsmasq.d/"
    # Recommended but not required (DHCP needs NET_ADMIN)
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    cap_add:
      - NET_ADMIN
    networks:
      private_network:
        ipv4_address: 10.2.0.100

Maybe I missed to uncomment some line?

@g1sbi
Copy link

g1sbi commented Mar 23, 2022

bump, I have the same problem

@Vinl0c
Copy link

Vinl0c commented Apr 12, 2022

Same here, can't access the pihole webinterface with the same config

@rahul1996pp
Copy link

you have to use different host port to access for example
ports:
- "1021:80/tcp"
So you can access with your ip:port

@eerondamoon
Copy link

you have to use different host port to access for example ports: - "1021:80/tcp" So you can access with your ip:port

even still can't access the pihole webinterface.

@Nezteb
Copy link

Nezteb commented Nov 14, 2023

Just to double check, are y'all connecting to Wireguard first before attempting to access Pi-hole?

Connect to WireGuard [first] and [then] access the Pi-hole admin pane

If you try to access Pihole without first connecting to WireGuard, you'll be unable to because the container exposes no interfaces/ports.

@raspberrycoulis
Copy link

Same issue for me. I have also added the ports to the pi-hole section of docker-compose.yml but still doesn't work. And yes, I am connected to Wireguard too.

@sabameron
Copy link

sabameron commented Jan 25, 2024

@Nezteb
I am having the same problem.
Changing port 53 was mentioned in the aforementioned solution, but I turned it off because I get an error that it is already in use.
Naturally, we first connected to Wireguard and checked access to the piHoleGUI.

version: "3"
networks:
  private_network:
    ipam:
      driver: default
      config:
        - subnet: 10.2.0.0/24
services:
  unbound:
    image: mvance/unbound:latest
    container_name: unbound
    restart: unless-stopped
    hostname: unbound
    volumes:
      - ./unbound:/opt/unbound/etc/unbound/
    networks:
      private_network:
        ipv4_address: 10.2.0.200
    cap_add:
      - NET_ADMIN
    env_file: .env
  wireguard:
    depends_on:
      - unbound
      - pihole
    image: linuxserver/wireguard
    container_name: wireguard
    ports:
      - 5000:5000
      - 51820:51820/udp
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
      - net.ipv4.ip_forward=1
    volumes:
      - ./config:/config
    env_file: .env

  wireguard-ui:
    image: ngoduykhanh/wireguard-ui:latest
    container_name: wireguard-ui
    depends_on:
      - wireguard
    cap_add:
      - NET_ADMIN
    network_mode: service:wireguard
    logging:
      driver: json-file
      options:
        max-size: 50m
    volumes:
      - ./db:/app/db
      - ./config:/config
    env_file: .env

  pihole:
    depends_on:
      - unbound
    container_name: pihole
    image: pihole/pihole:latest
    restart: unless-stopped
    hostname: pihole
    ports:
      - "67:67/udp"
      - "80:80/tcp"
      - "1021:80/tcp"
    dns:
      - 127.0.0.1
      - ${PIHOLE_DNS}
    volumes:
      - ./etc-pihole/:/etc/pihole/
      - ./etc-dnsmasq.d/:/etc/dnsmasq.d/
    cap_add:
      - NET_ADMIN
    networks:
      private_network:
        ipv4_address: 10.2.0.100
    env_file: ./.env```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants