OPNsense Forum
English Forums => Web Proxy Filtering and Caching => Topic started by: cristian_asir on May 06, 2019, 08:39:33 am
-
Hello, I have an issue with /etc/hosts.
I make changes in /etc/hosts but when I reboot OPNsense this changes dissapear and I have the same content than before.
Is so strange but I need to resolve it because I want to join an AD domain
-
What are you trying to add? Normally you use Unbound or Dnsmasq host overrides to fill that file.
Cheers,
Franco
-
That
127.0.0.1 localhost.localdomain localhost
10.109.2.80 OPNsense.localdomain OPNsense
search proxy.asir
domain proxy.asir
-
Do you need this info for clients only or the firewall as well? BTW, "search" and "domain" belong to resolv.conf (which is also rewritten for safety).
Cheers,
Franco
-
Sorry sorry...
I try to write
127.0.0.1 localhost.localdomain localhost
10.109.2.80 OPNsense.localdomain OPNsense
(/etc/hosts)
But when I reboot OPNsense the second line (10.109.2.80 OPNsense.localdomain localdomain) changes and I have other line content
-
Yup, you can use Dnsmasq and Unbound host overrides to achieve this.
Cheers,
Franco
-
I will try it, thanks for your help!!
-
Sure, let us know if it works. It might not end up in /etc/hosts specifically, but it will be served by Unbound/Dnsmasq itself.
Cheers,
Franco
-
root@OPNsense:~ # cat /etc/hosts
127.0.0.1 localhost localhost.localdomain
192.168.60.1 OPNsense.localdomain OPNsense >> This is the issue: I have the ip of one of my clients interfaces. AND I WANT the IP of my firewall :((
root@OPNsense:~ # cat /etc/resolv.conf
domain localdomain
nameserver 10.109.2.80
root@OPNsense:~ #