SDN DNS dnsmasq FQDN

stain

Member
Jan 18, 2022
4
0
6
54
Hi,

I have a Simple SDN with a dhcp SNATed VNet. I count on dnsmasq as a DNS. Dnsmasq responds with DNS-answers quite ok, but hosts are unqualified. I'd like to make dnsmasq to collect FQDNs of hosts. I'd like to make it as less hard-coded (like hardcoded IPs in configs) as possible. Tried some approaches, nothing helps. How to cook it?

Environment:
- Only containers CT/LXC
- Only Debian 12
- IPv4

Thank you
 
Last edited:
I'd like to make dnsmasq to collect FQDNs of hosts.
What exactly do you mean by this?

Generally you can setup dnsmasq to serve the DNS requests with an FQDN by adding additional configuration in the respective folder under /etc/dnsmasq.d :

Code:
domain=mydomain
 
What exactly do you mean by this?

Generally you can setup dnsmasq to serve the DNS requests with an FQDN by adding additional configuration in the respective folder under /etc/dnsmasq.d :

Code:
domain=mydomain
I want to assign a hostname to an LXC and I want dnsmasq to respect it.
I want dnsmasq to serve that name upon DNS request like <hostname.dns_domain> from the DNS setting of a container.
Like in /etc/hosts in the container
127.0.0.1 <hostname.dns_domain> <hostname>

and i don't want to hard-code any names into configs. I'd like it to be GUI-configurable
Currently dnsmasq DNS replies only with a <hostname> and not <hostname>.<dns_domain> (as in DNS setting of a container)
 
Last edited:
You could set up PowerDNS then, via the SDN PowerDNS plugin - then you can configure a domain via the UI (DNSZone in the Zone configuration). If you want to stick to using the dnsmasq instance from SDN, then you will have to manuall configure it using the method I described above.
 
Side-note: that could be added for dnsmasq to the GUI as well. Would be wow with just dnsmasq for simple tasks.
 
Also, since I did not mention it explicitly: Do not configure Dnsmasq to accept ANY FQDN. What's stopping other containers then from advertising themselves as e.g. deb.debian.org and intercepting all updates? Always use a fixed, pre-defined domain.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!