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

Problems when depolyed under Portainer 2.21.0 with bridge network #185

Open
bmwhd123 opened this issue Sep 2, 2024 · 2 comments
Open

Problems when depolyed under Portainer 2.21.0 with bridge network #185

bmwhd123 opened this issue Sep 2, 2024 · 2 comments

Comments

@bmwhd123
Copy link

bmwhd123 commented Sep 2, 2024

Describe the bug
I have been running the latest image of unbound from here along with pihole in two docker containers connected with a user defined bridge network. This setup worked perfectly for a long time on two Raspberry Pi 4Bs.

When the latest LTS version of portainer was released, 2.21.0, something changed. Unbound, which is mapped to port 5053 in it's container, stopped responding to pihole even though the containers can see each other. Unbound also responds to a dig command direct to it's container IP address.

I've submitted an issue on the portainer gitub but wanted to list the issue here as well.

To Reproduce
Steps to reproduce the behavior:

Here is the compose file for the stack in portainer:

Docker Compose version

version: "3-A"

networks:
dns_net:
driver: bridge
ipam:
config:
- subnet: 172.18.0.0/16

Define services (containers to be created)

services:
# Service name: pihole
pihole:
# Name of the container instance
container_name: pihole

# Image to use for this container
# Use the specified version of the pihole image
image: pihole/pihole:2024.07.0
networks:
  dns_net:
    ipv4_address: 172.18.0.7
 
# Expose and map ports (host:container)
ports:
  - "53:53/tcp" # DNS (TCP)
  - "53:53/udp" # DNS (UDP)
  - "7300:80/tcp" # Web UI HTTP

# Environment variables
environment:
  TZ: "America/Chicago" # Time Zone; Update this to your time zone
  WEBPASSWORD: "<PASSWORD HERE>" # Admin password for web UI; 
  PIHOLE_DNS_: '172.18.0.8#5053'

# Mount volumes for persistent data
volumes:
  - "/data/pihole/data/pihole:/etc/pihole" # Pi-hole data
  - "/data/pihole/data/dnsmasq:/etc/dnsmasq.d" # dnsmasq data

# Restart policy for the container when it exits
restart: unless-stopped

# DNS servers for this container to use
dns:
 - 127.0.0.1 # Localhost for internal resolution
 - 1.1.1.1 # Cloudflare DNS for external resolution

unbound:
container_name: unbound
image: alpinelinux/unbound:latest # remember to change this if you're not using rpi
networks:
dns_net:
ipv4_address: 172.18.0.8
volumes:
- "/data/pihole/data/unbound:/etc/unbound" # unbound data

ports:
 - "5053:53/tcp"
 - "5053:53/udp"
healthcheck:
  test: ["NONE"]
restart: unless-stopped

Once started, the containers appear to be operating normally but pihole gets no response to queries to unbound.

Expected behavior
Unbound should respond to pihole in its container.

Error messages
No error message, just no response.

Additional context
For reasons I can't understand, changing the address pihole is using for unbound in this example from 172.18.0.8#5053 to 172.18.0.8#53 seems to get things working again.

@djrm05
Copy link

djrm05 commented Sep 24, 2024

@bmwhd123 check the port you have set in your unbound.conf file in the line "interface:" . ...

@bmwhd123
Copy link
Author

That line reads: interface 0.0.0.0@5053

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

2 participants