anowak
September 21, 2021, 2:52am
1
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,
anowak
September 21, 2021, 7:01am
3
Running VyOS1.3R6.
so will I need to modify the template to get this to work?
Kind Regards
anowak
September 21, 2021, 9:31am
4
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?
anowak
September 22, 2021, 1:43pm
6
Just interested to understand why I can’t resolve my firewall by it’s name instead of IP address.
Cheers
ordex
July 15, 2024, 8:27am
9
@Viacheslav what version of VyOS supports suppressing the 127.0.0.1 entry?
My issue is that VyOS acts as DNS forwarder for my LAN and when I try to connect/ping the VyOS device I can’t use its hostname because it will be resolved to 127.0.0.1 by LAN devices.
anowak
July 17, 2024, 10:25pm
11
I ended up adding a static-host-mapping for the firewall with alias.
I haven’t tested the fix.