DNS local vyos hostname resolution

Hi,

Is it possible to add local host for the vyos router and remove 127.0.1.1?

Under the host file it shows the following and gets overwritten so can’t modify it directly

# Local host
127.0.0.1 localhost
127.0.1.1 vyos.fqdn vyos
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

I’ve added system static mapping but vyos still resolves to 127.0.1.1

Kind Regards

Depends on VyOS version and it’s hardcoded in templates hosts
Only one option it is edit this template,

Running VyOS1.3R6.
so will I need to modify the template to get this to work?

Kind Regards

Sorry what I meant was is there an attribute { host_name } but for {host_ip}?

Regards

What is your goal? Why do you need it?

Just interested to understand why I can’t resolve my firewall by it’s name instead of IP address.
Cheers