Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable DNSMasq DNS if port 53 conflict occurs #7210

Closed
DavidePrincipi opened this issue Dec 11, 2024 · 3 comments
Closed

Disable DNSMasq DNS if port 53 conflict occurs #7210

DavidePrincipi opened this issue Dec 11, 2024 · 3 comments
Assignees
Labels
verified All test cases were verified successfully

Comments

@DavidePrincipi
Copy link
Member

The core Samba DC application and DNSMasq have a potential conflict on port 53. If port 53 is in use, DNSMasq UI displays a message and disable the DNS feature. However the port conflict may still arise if:

  • DNSMasq is installed and configured from UI before Samba.
  • During clone or restore of both modules, no matter the order they are re-configured by the core.

Proposed solution

DNSMasq can discover from Samba Redis keys and events if there is a conflicting DC on the local node and automatically disable its DNS feature.

Alternative solutions

A more general solution is viable, but would require much more effort. We can define an image label, like the existing org.nethserver.max-per-node, where the application lists the fixed ports it will use. The Core can identify potential port conflicts with installed apps in advance and deny the instance creation on every possible scenario: install, update, restore, clone.

Additional context

Image

See also

Discussion https://mattermost.nethesis.it/nethesis/pl/9ko5xmf7oidijxkhku18xdtrzr

@DavidePrincipi DavidePrincipi self-assigned this Dec 11, 2024
@DavidePrincipi DavidePrincipi added this to the NethServer 8.3 milestone Dec 11, 2024
@DavidePrincipi DavidePrincipi moved this from ToDo to In Progress in NethServer Dec 11, 2024
DavidePrincipi added a commit to NethServer/ns8-dnsmasq that referenced this issue Dec 12, 2024
Inhibit DNS service if Samba is installed

Refs NethServer/dev#7210
@DavidePrincipi
Copy link
Member Author

In testing: 1.1.0-dev.2

Test case 1

  • Install and configure dnsmasq, enable DNS feature
  • Install Samba DC on another node: dnsmasq DNS is still enabled
  • Install Samba DC on the same node of dnsmasq: DNS becomes disabled

Test case 2

  • Restore dnsmasq from backup (with DNS enabled)
  • Restore Samba DC from backup on the same node

Test case 3

  • Install dnsmasq and configure DNS
  • Install Samba DC on another node
  • Move dnsmasq to the same node of Samba

Test case 4

Update a working dnsmasq instance to the testing version.


In any case, port conflict on DNS port 53 must be handled by forcing DNS setting of DNSMasq to disabled.

@DavidePrincipi DavidePrincipi removed their assignment Dec 12, 2024
@DavidePrincipi DavidePrincipi added the testing Packages are available from testing repositories label Dec 12, 2024
@nethbot nethbot moved this from In Progress to Testing in NethServer Dec 12, 2024
@nrauso nrauso self-assigned this Dec 12, 2024
@nrauso
Copy link

nrauso commented Dec 13, 2024

test case 1: VERIFIED
test case 2: VERIFIED
test case 3: VERIFIED
test case 4: VERIFIED

@nrauso nrauso added verified All test cases were verified successfully and removed testing Packages are available from testing repositories labels Dec 13, 2024
@nethbot nethbot moved this from Testing to In Progress in NethServer Dec 13, 2024
@nethbot nethbot moved this from In Progress to Verified in NethServer Dec 13, 2024
@DavidePrincipi
Copy link
Member Author

@github-project-automation github-project-automation bot moved this from Verified to Done in NethServer Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified All test cases were verified successfully
Projects
Archived in project
Development

No branches or pull requests

2 participants