Adguard default port mapping
Describe the bug
When installing Adguard from the store the default port mappings seem to be incorrect. UDP + TCP 53 on the container is mapped to 531 on the host. This means with the default setup no DNS requests will reach Adguard - clearly it should be mapped to 53 on the host. Also after setip the web panel is hosted on port 80 on the container, this is also missing from the default port mapping.
To Reproduce
Steps to reproduce the behavior:
- Go to App Store
- Click on Adguard home
- Click the dropdown > custom install
- See default port mappings
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
How can i fix this?
I have the same issue
@superjke @TheCorruptCat Here is a tutorial that walks you through installing Adguard Home: https://youtu.be/7NGnCbxBf_U
How can i fix this?
This is what my port mapping ended up looking like in the settings.
port 53 includes the host ip because without it I was getting dns issues with other containers.
To be clear, there are two issues here around the default port-mapping setup of the CasaOS Adguard Home app on the app store:
- The DNS mapping where port 53 (DNS) inside the container is mapped to port 531
- The Web UI mapping where port 3001 is mapped to port 3000
The first one I could almost understand, as many Linux distros may already have a resolver running. So by default not trying to bind to port 53 on the host avoids potential conflicts there. This then requires the admin of the system running CasaOS to first make sure that port 53 is actually available (i.e., that the host OS isn't already doing DNS), and then adjusting the settings to map the host's port 53 to the Adguard container's port 53. Unfortunately, by default, Adguard won't do anything if folks simply point their client devices at the IP of the CasaOS box, as they'll be trying to talk to port 53 for DNS while the mapping shows it's only listening on port 531 on the host.
The web UI mapping, however, is simply a mistake. By default, the settings should really be mapping
- host port 3001 to container port 80
This is because the first time a user of CasaOS runs Adguard after installing it, they go through a setup wizard where, by default, it has the web admin interface port set to port 80. If a new user simply answers the minimum number of items and leaves all the other presets alone, they'll have an install of Adguard that is listening on port 80 inside the container for web admin access.
I understand why 3000 shows up there, as it's often referenced in relation to setting up Adguard and what many Docker tutorials indicate using. But this should simply be set to 80 for the container, as that's the default listed when you configure Adguard in the setup wizard.
This is my config and I can access Admin UI from the port 3001 no problem. Now I just have problem with making it work properly haha