VyOS is a very nice little router, if your prefer your routers to be open source and avoid messing around with licenses constantly. I've been finding myself using it a lot when I need a simple virtualized router for various stuff.
There are some problems however, the major one being, that it is based on Debian Squeeze, which by now is ancient and a lot of the stuff I would expect to work, does not.
There are however also limitations which can be overcome with clever tricks. One such workaround follows, as my brief Google search yielded no results and I can't be the only one with this problem.
Scenario: You have a host in your network, are using VyOS as the nameserver and want to configure both ipv4 and ipv6 addresses.
The standard way of setting up DNS records on VyOS is using set system static-host-mapping host-name service.example.com inet <address>
. The problem with this is however, that if you naively try to:
set system static-host-mapping host-name service.example.com inet 2001:db8:dead:beef::1
set system static-host-mapping host-name service.example.com inet 198.51.100.1
You only get the last address in the config:
vyos@r1# show system static-host-mapping host-name service.example.com
+inet 198.51.100.1
The workaround I discovered for this is that you can have the same alias set for multiple host-names:
set system static-host-mapping host-name ipv6.service.example.com inet 2001:db8:dead:beef::1
set system static-host-mapping host-name ipv6.service.example.com alias service.example.com
set system static-host-mapping host-name ipv4.service.example.com inet 198.51.100.1
set system static-host-mapping host-name ipv4.service.example.com alias service.example.com
Resulting in:
+host-name ipv4.service.example.com {
+ alias service.example.com
+ inet 198.51.100.1
+}
+host-name ipv6.service.example.com {
+ alias service.example.com
+ inet 2001:db8:dead:beef::1
+}
And indeed, you get both A and AAAA records for service.example.com in your network now :)