Not sure if this is the right place to post but I have a question regarding the Stack installation of AGH in Portainer as very well explained here.
I followed the whole process and the ADG is running and accessible as per designed.
But, I would like to use AGH as DHCP Server and when I go into the DHCP menu and want to list the dropdown menu of all the available IP’s, I have only one: eth0 - 172.18.0.2
And I believe I should also have 192.168.1.25 which I shoul select to set up the DHCP Server.
So am I wrong in my supposition or is there something I might have missed in the Stack build up?
The problem you’re facing is likely due to the network mode the container is running in. By default, Docker uses a bridge network, which isolates the container from directly interacting with the host’s network interfaces in the way you need for DHCP.
Yes that’s correct you should see your LAN IP. You will need to change the network_mode to host.
version: '3' # Specify the Docker Compose version
services:
adguardhome: # Define the service named 'adguardhome'
image: adguard/adguardhome # Use the 'adguard/adguardhome' Docker image
container_name: adguardhome # Set the container name to 'adguardhome'
restart: unless-stopped # Restart the container automatically unless stopped manually
network_mode: host # Run the container using the host's network stack
volumes: # Mount host directories as volumes inside the container
- /data/adguard-home/work:/opt/adguardhome/work # Mount '/data/adguard-home/work' to '/opt/adguardhome/work'
- /data/adguard-home/confdir:/opt/adguardhome/conf # Mount '/data/adguard-home/confdir' to '/opt/adguardhome/conf'
# Uncomment below if needed, but be cautious
# privileged: true
# cap_add:
# - NET_ADMIN