OPNsense Forum

English Forums => 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.

Code: [Select]
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:
Code: [Select]
man hosts
Code: [Select]
man inet