[GH-ISSUE #442] Enhancement: Return Host Machine IP when there is not an available IP #159

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

Originally created by @mageddo on GitHub (May 2, 2024).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/442

What is expected

Change the feature "return host machine IP when there is not an available IP to answer" to not answer the Host Machine IP when it won't be possible to use that IP.

The feature is useful when

  • If the ports of the container are exposed to the host and there are no networks in the container or all the container networks are not in bridge mode (it happens when the container is executed using docker-compose, bridge networks are dropped in this case.
  • When the container is running in network mode = host

What is Happening

As mentioned at #429 there would be scenarios when disable that feature can be a better behavior, when:

  • The container haven't published ports and it's not in host network mode

Changes

The feature toggle as chosen as it give to client total power of decision of using or not that feature.

Create a feature toggle

A feature toggle to it turn off, turned on as default to maintain the backward compatibility.

Name: dockerSolverHostMachineFallback

### Try to identify the wanted and unwanted scenario automatically Not prioritized for now

If the container it's not in network mode = host and have not published ports then it makes no sense to answer the host IP address, do return no IP instead (NXDOMAIN).

Originally created by @mageddo on GitHub (May 2, 2024). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/442 ## What is expected Change the feature "return host machine IP when there is not an available IP to answer" to not answer the Host Machine IP when it won't be possible to use that IP. The feature is useful when * If the ports of the container are exposed to the host and there are no networks in the container or all the container networks are not in bridge mode (it happens when the container is executed using docker-compose, bridge networks are dropped in this case. * When the container is running in network mode = host ## What is Happening As mentioned at #429 there would be scenarios when disable that feature can be a better behavior, when: * The container haven't published ports and it's not in host network mode ## Changes The feature toggle as chosen as it give to client total power of decision of using or not that feature. ### Create a feature toggle A feature toggle to it turn off, turned on as default to maintain the backward compatibility. Name: `dockerSolverHostMachineFallback` ~### Try to identify the wanted and unwanted scenario automatically~ Not prioritized for now ~If the container it's not in network mode = host and have not published ports then it makes no sense to answer the host IP address, do return no IP instead (NXDOMAIN).~
kerem 2026-02-26 04:34:13 +03:00
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#159
No description provided.