[GH-ISSUE #617] Feature Request: Allow override of container IPs #202

Closed
opened 2026-02-26 04:34:22 +03:00 by kerem · 3 comments
Owner

Originally created by @tomrund on GitHub (Dec 15, 2024).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/617

Hi, I recently setup a reverse proxy for my docker containers and also have letsencrypt grabbing certs for the reverse proxy which is really nice! The last piece I needed was some way to resolve containers that are being reverse proxied, to the docker host automatically. I thought I might be able to utilize dns-proxy-server for this, however I can't find any way to override the real container IPs that dns-proxy-server is resolving with, with a different IP address (the reverse proxy listen IP).

I'm not sure if there's a better way to accomplish this than adding a feature to dns-proxy-server, but if there was a simple configuration option OVERRIDE_CONTAINER_RESOLVE_IP or similar, and setting it would have all containers resolve with that IP instead of their real IP, that would solve my problem.

I would just setup a wildcard DNS for the domain, but there are some other hosts on the domain that aren't containers running on the docker host in question. So I was hoping to have a way to automatically setup DNS records for containers running on this host and have the records resolve to the docker host's reverse proxy.

Originally created by @tomrund on GitHub (Dec 15, 2024). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/617 Hi, I recently setup a reverse proxy for my docker containers and also have letsencrypt grabbing certs for the reverse proxy which is really nice! The last piece I needed was some way to resolve containers that are being reverse proxied, to the docker host automatically. I thought I might be able to utilize dns-proxy-server for this, however I can't find any way to override the real container IPs that dns-proxy-server is resolving with, with a different IP address (the reverse proxy listen IP). I'm not sure if there's a better way to accomplish this than adding a feature to dns-proxy-server, but if there was a simple configuration option `OVERRIDE_CONTAINER_RESOLVE_IP` or similar, and setting it would have all containers resolve with that IP instead of their real IP, that would solve my problem. I would just setup a wildcard DNS for the domain, but there are some other hosts on the domain that aren't containers running on the docker host in question. So I was hoping to have a way to automatically setup DNS records for containers running on this host and have the records resolve to the docker host's reverse proxy.
Author
Owner

@mageddo commented on GitHub (Dec 16, 2024):

Hey, I can think of two options to achieve this:

By using Local Entries Solver

Create a A Record for each hostname you want to point to the reverse-proxy specifying the reverse-proxy IP

Using Docker Solver

If the reverse-proxy is a container start it using the hostnames you want it to be bind with, ex docker run -e HOSTNAMES=host1.com,host2.com ... and run the containers with some local hostname like host1.docker to prevent conflicts on the DNS registration

<!-- gh-comment-id:2545869576 --> @mageddo commented on GitHub (Dec 16, 2024): Hey, I can think of two options to achieve this: ### By using [Local Entries Solver][1] Create a **A Record** for each hostname you want to point to the reverse-proxy specifying the reverse-proxy IP ### Using Docker Solver If the reverse-proxy is a container start it using the hostnames you want it to be bind with, ex `docker run -e HOSTNAMES=host1.com,host2.com ...` and run the containers with some local hostname like `host1.docker` to prevent conflicts on the DNS registration [1]: https://mageddo.github.io/dns-proxy-server/latest/en/2-features/local-entries/
Author
Owner

@github-actions[bot] commented on GitHub (Jan 11, 2025):

This issue is stale because it has been waiting-feedback for 15 days with no activity.

<!-- gh-comment-id:2585133078 --> @github-actions[bot] commented on GitHub (Jan 11, 2025): This issue is stale because it has been waiting-feedback for 15 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 19, 2025):

This issue was closed because it has been inactive for 7 days since being marked as stale, you can reopen it at any time.

<!-- gh-comment-id:2600741153 --> @github-actions[bot] commented on GitHub (Jan 19, 2025): This issue was closed because it has been inactive for 7 days since being marked as stale, you can reopen it at any time.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#202
No description provided.