OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: user1234 on November 21, 2023, 10:49:02 PM

Title: what populates /etc/hosts
Post by: user1234 on November 21, 2023, 10:49:02 PM
On my opnsense install the /etc/hosts file has a single entry for the firewall but I can't work out how it selects which address to use.

root@firewall:~ # cat /etc/hosts
127.0.0.1       localhost       localhost.home
::1             localhost       localhost.home
192.168.2.254   firewall        firewall.home


My firewall has 8 vlans with IPs on and it appears to select one to put into the hosts file.
Is there a way to influence which IP address is used?
Title: Re: what populates /etc/hosts
Post by: cookiemonster on November 21, 2023, 11:00:33 PM
part of the OS (freebsd).
you can read:
man hosts
man inet