Page MenuHomeVyOS Platform

Add possibility to serve static DNS zones from the router
Open, NormalPublicFEATURE REQUEST

Description

SUMMARY

Some routers have the ability to serve DNS zones without an upstream server (for instance, Cisco IOS routers have had this since a very long time) . This feature request is about adding this capability to VyOS.

USE CASE FOR THE REQUESTED FEATURE

Infrastructure-light sites (e.g., branch offices) might not contain servers at all (there might just be appliances like storage or VoIP stuff), yet having DNS is useful, for instance for people being able to access the appliances through a name, or to ease the task of roaming field engineers -- it's always simpler to "ping wifiap" rather than rummaging through the docs to see what the AP address is on a particular site.

Being able to provide this without adding complexity to the setup is, in my opinion, a good thing.

SUGGESTED IMPLEMENTATION

The PowerDNS recursor has a feature to serve static zones. The attached patch adds commands to setup zones and zone records (and a few more things I happen to use sometimes, like additional options for the recursor). All the added commands are under service dns forwarding advanced. This is not supposed to be their definite placement, it's just to avoid any conflict with official commands in my custom builds.

Details

Difficulty level
Normal (likely a few hours)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

Oh, actually I just noticed this was a duplicate of T562, I should have posted there. Sorry about that :-(

Hi @wsapplegate,

at first glance this looks very interesting. Befor this can be added I would like to give the following comments:

  • adding a cli node that passes raw config values from cli to the daemon is bad (we inherited this for dhcp and openvpn and it caused more harm then good in the last 2 years) - is this mandatory?
  • even dns using A, AAAA, PTR upper case types we should keep the CLI lowercase - this can be easily handled within the Jinja2 template.
  • having > 20 dns records here could really bleow up the CLI, maybe we should thing about loading the zone from a file @zdc @dmbaturin @jestabro?

I saw multiple times configs with a firewall section that contains about a thousand lines, so I do not think that DNS records are something size-critical that deserves additional config files.
I believe that keeping config parts outside the config.boot is a bad idea in general that against our main benefit - single config for everything.

Viacheslav changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).
In T3337#87766, @c-po wrote:
  • adding a cli node that passes raw config values from cli to the daemon is bad (we inherited this for dhcp and openvpn and it caused more harm then good in the last 2 years) - is this mandatory?

You mean the pdns-option thing? Actually, this is a legacy thing I very rarely used. It's not even related to the zone setup, I just happen to have every PowerDNS enhancement in the same patch.

  • even dns using A, AAAA, PTR upper case types we should keep the CLI lowercase - this can be easily handled within the Jinja2 template.

OK, here's a version of the patch without the pdns-option thing and with lowercase CLI nodes:

Any chance you can send this as GitHub PR?

Sorry, I don't have a GitHub account (I try hard to avoid centralized systems). If what you want is a git repo/branch to pull from, I can setup one somewhere and commit the patch there, though.