CasaOS icon indicating copy to clipboard operation
CasaOS copied to clipboard

Adguard default port mapping

Open superjke opened this issue 1 year ago • 6 comments

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:

  1. Go to App Store
  2. Click on Adguard home
  3. Click the dropdown > custom install
  4. See default port mappings

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

Screenshot 2024-05-13 164724

superjke avatar May 13 '24 15:05 superjke

How can i fix this?

TheCorruptCat avatar Jun 17 '24 00:06 TheCorruptCat

I have the same issue

TheCorruptCat avatar Jun 17 '24 00:06 TheCorruptCat

@superjke @TheCorruptCat Here is a tutorial that walks you through installing Adguard Home: https://youtu.be/7NGnCbxBf_U

dragonfire1119 avatar Jun 17 '24 01:06 dragonfire1119

How can i fix this?

This is what my port mapping ended up looking like in the settings.

IMG_5792

port 53 includes the host ip because without it I was getting dns issues with other containers.

superjke avatar Jun 17 '24 14:06 superjke

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.

fseesink avatar Sep 28 '24 19:09 fseesink

{BD8E5EC9-19D6-4DE9-A0B3-1B2304217635}

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

ByteBolt556 avatar Oct 24 '24 10:10 ByteBolt556